Class QuickAccessToolBar
Represents a QuickAccessToolBar control.
Inheritance
Implements
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public class QuickAccessToolBar : ItemsControl, IDisposable
Remarks
QuickAccessToolBar class represents a control that displays horizontal row of the most commonly used commands in your application, with overflow support, also it supports ContextMenu clicking on it's dropdown button.
Examples
This example shows how to create a QuickAccessToolBar in XAML.
<ribbon:QuickAccessToolBar>
<ribbon:RibbonButton ribbon:Ribbon.KeyTip="1" Command="ApplicationCommands.Close"/>
<ribbon:RibbonButton ribbon:Ribbon.KeyTip="2" Command="ApplicationCommands.Save">
</ribbon:QuickAccessToolBar>
This example shows how to create a QuickAccessToolBar in C#.
RibbonButton button1;
RibbonButton button2;
QuickAccessToolBar toolbar = new QuickAccessToolBar();
toolbar.Items.Add(button1);
toolbar.Items.Add(button2);
Constructors
QuickAccessToolBar()
Initializes a new instance of the QuickAccessToolBar class.
Declaration
public QuickAccessToolBar()
Fields
AllowToolTipOnQATProperty
Defines whether Allow ToolTip on QAT or not. This is a dependency property.
Declaration
public static readonly DependencyProperty AllowToolTipOnQATProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
AutoPersistProperty
Identifies the AutoPersist dependency property.
Declaration
public static readonly DependencyProperty AutoPersistProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
GeometryBackgroundProperty
Defines background color or gradient for geometry. This is a dependency property.
Declaration
public static readonly DependencyProperty GeometryBackgroundProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
GeometryStrokeProperty
Defines Stroke color or gradient for geometry. This is a dependency property.
Declaration
public static readonly DependencyProperty GeometryStrokeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
GeometryStrokeThicknessProperty
Defines the Geometry stroke thickness
Declaration
public static readonly DependencyProperty GeometryStrokeThicknessProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
HasGeometryProperty
Defines when QAT should be rendered with geometry. This is a dependency property.
Declaration
public static readonly DependencyProperty HasGeometryProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
HasOverflowChildrenProperty
Defines when QAT has children in popup. This is a dependency property.
Declaration
public static readonly DependencyProperty HasOverflowChildrenProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
QATDropDownVisiblityProperty
Identifies the QATDropDownVisiblity dependency property.
Declaration
public static readonly DependencyProperty QATDropDownVisiblityProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the QATDropDownVisiblity dependency property.
ShowAllCommandProperty
Identifies the ShowAllCommand dependency property.
Declaration
public static readonly DependencyProperty ShowAllCommandProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the ShowAllCommand dependency property.
ShowBackstageCommandsProperty
Identifies the ShowBackstageCommands dependency property.
Declaration
public static readonly DependencyProperty ShowBackstageCommandsProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the ShowBackstageCommands dependency property.
ShowCommandProviderProperty
Identifies the ShowCommandProvider dependency property.
Declaration
public static readonly DependencyProperty ShowCommandProviderProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the ShowCommandProvider dependency property.
ShowTabCommandsProperty
Identifies the ShowTabCommands dependency property.
Declaration
public static readonly DependencyProperty ShowTabCommandsProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
The identifier for the ShowTabCommands dependency property.
VisibleItemsCountProperty
Defines children count that are not contained in popup. This is a dependency property.
Declaration
protected static readonly DependencyProperty VisibleItemsCountProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Properties
AllowToolTipOnQAT
Declaration
public bool AllowToolTipOnQAT { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
AutoPersist
Gets or sets a value indicating whether [save original state].
Declaration
public bool AutoPersist { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
CustomQATItems
Gets or sets the QAT items collection that are independent of the Items added inside the Ribbon.
Declaration
public ObservableCollection<RibbonButton> CustomQATItems { get; set; }
Property Value
| Type |
|---|
| System.Collections.ObjectModel.ObservableCollection<RibbonButton> |
DefaultItems
Gets the default items.
Declaration
protected List<UIElement> DefaultItems { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Windows.UIElement> | The default items. |
GeometryBackground
Gets or sets background color or gradient for geometry.
Declaration
public Brush GeometryBackground { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.Brush |
GeometryStroke
Gets or sets Stroke color or gradient for geometry.
Declaration
public Brush GeometryStroke { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.Brush |
GeometryStrokeThickness
Gets or sets the Geometry stroke thickness
Declaration
public double GeometryStrokeThickness { get; set; }
Property Value
| Type |
|---|
| System.Double |
HasGeometry
Gets or sets a value indicating whether this instance has geometry.
Declaration
public bool HasGeometry { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
HasOverflowChildren
Gets or sets a value indicating whether this instance has overflow children.
Declaration
public bool HasOverflowChildren { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
QATDropDownVisiblity
Gets or sets the QAT drop down visiblity.
Declaration
public Visibility QATDropDownVisiblity { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Windows.Visibility | The QAT drop down visiblity. |
QATMenuItems
Gets the QAT menu items.
Declaration
public ObservableCollection<RibbonButton> QATMenuItems { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.ObjectModel.ObservableCollection<RibbonButton> | The QAT menu items. |
Ribbon
Gets or sets the ribbon.
Declaration
protected Ribbon Ribbon { get; set; }
Property Value
| Type | Description |
|---|---|
| Ribbon | The ribbon. |
ShowAllCommand
Gets or sets the value check whether show all command or not;This is a dependency property.
Declaration
public bool ShowAllCommand { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ShowBackstageCommands
Gets or sets the value check whether showbackstage command or not;This is a dependency property.
Declaration
public bool ShowBackstageCommands { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ShowCommandProvider
Gets or sets the value check whether show command provider or not;This is a dependency property.
Declaration
public bool ShowCommandProvider { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ShowTabCommands
Gets or sets the value check whether show backstage commands or not;This is a dependency property.
Declaration
public bool ShowTabCommands { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
VisibleItemsCount
Gets or sets the visible items count.
Declaration
protected int VisibleItemsCount { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The visible items count. |
Methods
checkVisibleDrodownButton()
Checks the visible drodown button.
Declaration
protected void checkVisibleDrodownButton()
Dispose()
Declaration
public void Dispose()
FilterItems(Object)
CollectionView filter. Filters items by index.
Declaration
protected bool FilterItems(object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | item | Object from Items collection. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True, if index of item is less than VisibleItemsCount - 1; otherwise, false. |
FilterItemsInvert(Object)
CollectionView filter. Filters items by index.
Declaration
protected bool FilterItemsInvert(object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | item | Object from Items collection. |
Returns
| Type | Description |
|---|---|
| System.Boolean | FilterItems inversion. |
GetChild(String)
Gets the child.
Declaration
protected DependencyObject GetChild(string childName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | childName | Name of the child. |
Returns
| Type | Description |
|---|---|
| System.Windows.DependencyObject | Template child |
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
| Type | Description |
|---|---|
| System.Windows.DependencyObject | The element that is used to display the given item. |
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own container.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | item | The item to check. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the item is (or is eligible to be) its own container; otherwise, false. |
LockQATItemsChange()
Locks the QAT items change.
Declaration
protected void LockQATItemsChange()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
| Type |
|---|
| System.Windows.Automation.Peers.AutomationPeer |
OnGeometryBackgroundChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises GeometryBackgroundChanged event.
Declaration
protected virtual void OnGeometryBackgroundChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnGeometryStrokeChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises GeometryStrokeChanged event.
Declaration
protected virtual void OnGeometryStrokeChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnHasGeometryChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises HasGeometryChanged event.
Declaration
protected virtual void OnHasGeometryChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnHasOverflowChildrenChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises HasOverflowChildrenChanged event.
Declaration
protected virtual void OnHasOverflowChildrenChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when the Items property changes.
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | Information about the change. |
OnItemsSourceChanged(IEnumerable, IEnumerable)
Called when the ItemsSource property changes.
Declaration
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.IEnumerable | oldValue | Old value of the ItemsSource property. |
| System.Collections.IEnumerable | newValue | New value of the ItemsSource property. |
OnMouseRightButtonUp(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseRightButtonUp�routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseRightButtonUp(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the right mouse button was released. |
OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled PreviewMouseLeftButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.MouseButtonEventArgs | e |
OnPreviewTouchDown(TouchEventArgs)
Provides class handling for the PreviewTouchDown routed event that occurs when a touch presses this element.
Declaration
protected override void OnPreviewTouchDown(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.TouchEventArgs | e | A TouchEventArgs that contains the event data. |
OnStylusSystemGesture(StylusSystemGestureEventArgs)
Invoked when an unhandled Stylus.StylusSystemGesture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Declaration
protected override void OnStylusSystemGesture(StylusSystemGestureEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.StylusSystemGestureEventArgs | e | The event data |
OnTouchUp(TouchEventArgs)
Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.
Declaration
protected override void OnTouchUp(TouchEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Input.TouchEventArgs | e | The event data |
OnVisibleItemsCountChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises VisibleItemsCountChanged event.
Declaration
protected virtual void OnVisibleItemsCountChanged(DependencyPropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.DependencyObject | element | Element used to display the specified item. |
| System.Object | item | Specified item. |
UnlockQATItemsChange()
Unlocks the QAT items change.
Declaration
protected void UnlockQATItemsChange()
UpdateQATItemsState()
Updates the state of the QAT items.
Declaration
public void UpdateQATItemsState()
Events
GeometryBackgroundChanged
Event that is raised when GeometryBackground property is changed.
Declaration
public event PropertyChangedCallback GeometryBackgroundChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
GeometryStrokeChanged
Event that is raised when GeometryStroke property is changed.
Declaration
public event PropertyChangedCallback GeometryStrokeChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
HasGeometryChanged
Event that is raised when HasGeometry property is changed.
Declaration
public event PropertyChangedCallback HasGeometryChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
HasOverflowChildrenChanged
Event that is raised when HasOverflowChildren property is changed.
Declaration
public event PropertyChangedCallback HasOverflowChildrenChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
QATItemAdded
Occurs when [QAT item added].
Declaration
public event EventHandler QATItemAdded
Event Type
| Type |
|---|
| System.EventHandler |
QATItemRemoved
Occurs when [QAT item removed].
Declaration
public event EventHandler QATItemRemoved
Event Type
| Type |
|---|
| System.EventHandler |
VisibleItemsCountChanged
Event that is raised when VisibleItemsCount property is changed.
Declaration
protected event PropertyChangedCallback VisibleItemsCountChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
VisualInitializeCompleete
Raises when QAT visual initialization is completed.
Declaration
protected event EventHandler VisualInitializeCompleete
Event Type
| Type |
|---|
| System.EventHandler |