QuickAccessToolBar Class
Represents a quick access toolbar for a Ribbon.
[TemplatePart(Name = "PART_OverflowItemsControl", Type = typeof(ItemsControl))]
[TemplatePart(Name = "PART_VisibleItemsControl", Type = typeof(ItemsControl))]
public class QuickAccessToolBar : Control, IOverflowableItemsControl
- Inheritance:
- object Visual UIElement FrameworkElement Control object
- Implements:
- IOverflowableItemsControl
Remarks
For detailed documentation on this control's features and how to use them, please see the QuickAccessToolBar documentation topic.
Constructors
QuickAccessToolBar()
Initializes an instance of the class.
public QuickAccessToolBar()
Properties
HasItems
Gets whether the QAT contains any items.
public bool HasItems { get; }
Property Value
- bool:
true
if the QAT contains any items; otherwise,false
.
IsBelowRibbon
Gets whether the QAT is below the ribbon.
public bool IsBelowRibbon { get; set; }
Property Value
- bool:
true
if the QAT is below the ribbon; otherwise,false
. The default value isfalse
.
IsCustomizeButtonVisible
Gets whether the customize button is visible next to the QAT.
public bool IsCustomizeButtonVisible { get; set; }
Property Value
- bool:
true
if the customize button is visible next to the QAT; otherwise,false
. The default value istrue
.
IsOverflowed
Gets whether the QAT is overflowed with items.
public bool IsOverflowed { get; }
Property Value
- bool:
true
if the QAT is overflowed with items; otherwise,false
.
IsTitleBarActive
Gets or sets whether the title bar containing the QAT is currently active.
public bool IsTitleBarActive { get; set; }
Property Value
- bool:
true
if the title bar containing the QAT is currently active; otherwise,false
. The default value isfalse
.
ItemsSource
Gets or sets the items source for the toolbar.
OverflowedItems
Gets an DeferrableObservableCollection<UIElement>
that contains the items that should appear on the overflow popup.
public DeferrableObservableCollection<UIElement> OverflowedItems { get; }
Property Value
- DeferrableObservableCollection<UIElement>:
An
DeferrableObservableCollection<UIElement>
that contains the items that should appear on the overflow popup.
Ribbon
Gets or sets the Ribbon to attach to.
UseAccentStyle
Gets or sets whether to use an accent style for rendering the QAT's contents.
public bool UseAccentStyle { get; set; }
Property Value
- bool:
true
if an accent style should be used for rendering the QAT's contents; otherwise,false
. The default value isfalse
.
VisibleItems
Gets an DeferrableObservableCollection<UIElement>
that contains the items that should appear on the main control.
public DeferrableObservableCollection<UIElement> VisibleItems { get; }
Property Value
- DeferrableObservableCollection<UIElement>:
An
DeferrableObservableCollection<UIElement>
that contains the items that should appear on the main control.
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
protected override Size ArrangeOverride(Size arrangeBounds)
Parameter | Type | Description |
---|---|---|
arrangeBounds | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
MeasureOverride(Size)
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
protected override Size MeasureOverride(Size availableSize)
Parameter | Type | Description |
---|---|---|
availableSize | Size | The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available. |
Returns
- Size:
The size that this element determines it needs during layout, based on its calculations of child element sizes.
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnKeyDown(KeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | KeyEventArgs | The KeyEventArgs that contains the event data. |
Fields
HasItemsProperty
Identifies the HasItems dependency property. This field is read-only.
public static readonly DependencyProperty HasItemsProperty
IsBelowRibbonProperty
Identifies the IsBelowRibbon dependency property. This field is read-only.
public static readonly DependencyProperty IsBelowRibbonProperty
IsCustomizeButtonVisibleProperty
Identifies the IsCustomizeButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsCustomizeButtonVisibleProperty
IsOverflowedProperty
Identifies the IsOverflowed dependency property. This field is read-only.
public static readonly DependencyProperty IsOverflowedProperty
IsTitleBarActiveProperty
Identifies the IsTitleBarActive dependency property. This field is read-only.
public static readonly DependencyProperty IsTitleBarActiveProperty
ItemsSourceProperty
Identifies the ItemsSource dependency property. This field is read-only.
public static readonly DependencyProperty ItemsSourceProperty
RibbonProperty
Identifies the Ribbon dependency property. This field is read-only.
public static readonly DependencyProperty RibbonProperty
UseAccentStyleProperty
Identifies the UseAccentStyle dependency property. This field is read-only.
public static readonly DependencyProperty UseAccentStyleProperty