Quick Access Toolbar

  • 2 minutes to read

The Ribbon Quick Access Toolbar is a customizable element that is designed to provide end-users with one-click access to the most important and used features. It is represented by the RibbonQuickAccessToolbar class.

QuickAccessToolbar

By default, this toolbar is displayed above the Ribbon Control. Its location can be changed using the RibbonControl.ToolbarLocation property.

NOTE

The Ribbon Quick Access Toolbar is unavailable in the RibbonControlStyle.TabletOfficeEx and RibbonControlStyle.OfficeUniversal styles.

Quick Access Toolbar Elements

  • Customize Button

    When an end-user clicks this button, the drop down menu is displayed. This menu allows end-users to change the location of the Quick Access Toolbar and the visibility of item links within.

    CustomizeButtonDropDownMenu

    The visibility of the Customize Button is specified by the RibbonQuickAccessToolbar.ShowCustomizeItem property.

  • Item Links

    End-users can add links to the desired bar items by right-clicking them and choosing "Add to Quick Access Toolbar" from the context menu.

    RibbonItemContextMenu

    The collection of item links that are displayed within the toolbar can be accessed in code using the RibbonQuickAccessToolbar.ItemLinks property. This collection allows you to add, remove and access individual item links. To manage this collection at design time, use the Designer.

Saving and Restoring Layout

The Quick Access Toolbar supports runtime customization. An end-user can add bar commands displayed within Ribbon page groups to the Toolbar using context menus. However, runtime changes to the Toolbar are not saved between application runs. The layout of bar commands within the Toolbar must be saved, and then restored manually. To save the layout of bar commands within the Toolbar, call one of the SaveLayoutTo... methods provided by the RibbonQuickAccessToolbar object. These are the RibbonQuickAccessToolbar.SaveLayoutToRegistry, RibbonQuickAccessToolbar.SaveLayoutToStream and RibbonQuickAccessToolbar.SaveLayoutToXml methods. To restore the saved layout later, call a corresponding RestoreLayoutFrom... method (RibbonQuickAccessToolbar.RestoreLayoutFromRegistry, RibbonQuickAccessToolbar.RestoreLayoutFromStream or RibbonQuickAccessToolbar.RestoreLayoutFromXml).