In This Article

RibbonQuickAccessToolBar Class

Represents a quick-access toolbar control, used within a ActiproSoftware.Windows.Controls.Bars.RibbonQuickAccessToolBar.Ribbon.

[TemplatePart(Name = "PART_InlineCustomizeButton", Type = typeof(RibbonQuickAccessToolBarCustomizeButton))]
[TemplatePart(Name = "PART_InlineOverflowButton", Type = typeof(RibbonQuickAccessToolBarOverflowPanel))]
[TemplatePart(Name = "PART_OverflowCustomizeButton", Type = typeof(RibbonQuickAccessToolBarCustomizeButton))]
[TemplatePart(Name = "PART_OverflowPanel", Type = typeof(RibbonQuickAccessToolBarOverflowButton))]
public class RibbonQuickAccessToolBar : ItemsControl, IOverflowingItemsControl, IOrientedElement
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object
Implements:
IOverflowingItemsControl IOrientedElement

Constructors

RibbonQuickAccessToolBar()

Initializes a new instance of the RibbonQuickAccessToolBar class.

public RibbonQuickAccessToolBar()

Properties

AllowLabels

Gets or sets whether to allow labels on the items in the quick-access toolbar.

public bool AllowLabels { get; set; }

Property Value

bool:

true if labels should be allowed on the items in the quick-access toolbar; otherwise, false.

CommonItems

Gets or sets the collection of common items that are available to be quickly added or removed from the Customize button.

public IList CommonItems { get; set; }

Property Value

IList:

The collection of common items that are available to be quickly added or removed from the Customize button.

CustomizeButtonKeyTipText

Gets or sets the Customize button's key tip text.

[Localizability(LocalizationCategory.Label)]
public string CustomizeButtonKeyTipText { get; set; }

Property Value

string:

The Customize button's key tip text.

CustomizeButtonToolTip

Gets or sets the Customize button's tooltip.

public object CustomizeButtonToolTip { get; set; }

Property Value

object:

The Customize button's tooltip.

IsCustomizeButtonVisible

Gets or sets whether the Customize button is visible.

public bool IsCustomizeButtonVisible { get; set; }

Property Value

bool:

true if the Customize button is visible; otherwise, false.

IsInWindowTitleBar

Gets whether the QAT is in the window's title bar.

public bool IsInWindowTitleBar { get; }

Property Value

bool:

true if the QAT is in the window's title bar; otherwise, false.

IsOverflowed

Gets whether the control currently has overflowed items.

public bool IsOverflowed { get; }

Property Value

bool:

true if the control currently has overflowed items; otherwise, false.

KeyTipTextPrefix

Gets or sets the optional text to prefix the numbers used for QAT item key tip text.

public string KeyTipTextPrefix { get; set; }

Property Value

string:

The optional text to prefix the numbers used for QAT item key tip text.

Remarks

This property is useful when ribbon tab key tip text might start with a number that could conflict with the key tip text of a QAT item. In that scenario, setting the prefix to a letter such as Q could prevent conflicts.

Location

Gets or sets a RibbonQuickAccessToolBarLocation that indicates the current location of the quick-access toolbar.

public RibbonQuickAccessToolBarLocation Location { get; set; }

Property Value

RibbonQuickAccessToolBarLocation:

A RibbonQuickAccessToolBarLocation that indicates the current location of the quick-access toolbar. The default value is Below.

OverflowButtonKeyTipText

Gets or sets the Overflow button's key tip text.

[Localizability(LocalizationCategory.Label)]
public string OverflowButtonKeyTipText { get; set; }

Property Value

string:

The Overflow button's key tip text.

OverflowButtonToolTip

Gets or sets the Overflow button's tooltip.

public object OverflowButtonToolTip { get; set; }

Property Value

object:

The Overflow button's tooltip.

Methods

ClearContainerForItemOverride(DependencyObject, object)

When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, object) method.

protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

The container element.

item object

The item.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

protected override DependencyObject GetContainerForItemOverride()

Returns

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.

protected override bool IsItemItsOwnContainerOverride(object item)
Parameter Type Description
item object

The item to check.

Returns

bool:

true if the item is (or is eligible to be) its own container; otherwise, false.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

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 the KeyDown event is received.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

Information about the event.

OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.PreviewGotKeyboardFocus 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 OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameter Type Description
e KeyboardFocusChangedEventArgs

The KeyboardFocusChangedEventArgs that contains the event data.

OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown 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 OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameter Type Description
e KeyboardFocusChangedEventArgs

The KeyboardFocusChangedEventArgs that contains the event data.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

Element used to display the specified item.

item object

Specified item.

Fields

AllowLabelsProperty

Identifies the AllowLabels dependency property. This field is read-only.

public static readonly DependencyProperty AllowLabelsProperty

CommonItemsProperty

Identifies the CommonItems dependency property. This field is read-only.

public static readonly DependencyProperty CommonItemsProperty

CustomizeButtonKeyTipTextProperty

Identifies the CustomizeButtonKeyTipText dependency property. This field is read-only.

public static readonly DependencyProperty CustomizeButtonKeyTipTextProperty

CustomizeButtonToolTipProperty

Identifies the CustomizeButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty CustomizeButtonToolTipProperty

IsCustomizeButtonVisibleProperty

Identifies the IsCustomizeButtonVisible dependency property. This field is read-only.

public static readonly DependencyProperty IsCustomizeButtonVisibleProperty

IsInWindowTitleBarProperty

Identifies the IsInWindowTitleBar dependency property. This field is read-only.

public static readonly DependencyProperty IsInWindowTitleBarProperty

IsOverflowedProperty

Identifies the IsOverflowed dependency property. This field is read-only.

public static readonly DependencyProperty IsOverflowedProperty

KeyTipTextPrefixProperty

Identifies the KeyTipTextPrefix dependency property. This field is read-only.

public static readonly DependencyProperty KeyTipTextPrefixProperty

LocationProperty

Identifies the Location dependency property. This field is read-only.

public static readonly DependencyProperty LocationProperty

OverflowButtonKeyTipTextProperty

Identifies the OverflowButtonKeyTipText dependency property. This field is read-only.

public static readonly DependencyProperty OverflowButtonKeyTipTextProperty

OverflowButtonToolTipProperty

Identifies the OverflowButtonToolTip dependency property. This field is read-only.

public static readonly DependencyProperty OverflowButtonToolTipProperty