- 3 minutes to read
The RibbonControl supports runtime customization options much like those found in Office 2010.
The runtime customization feature is enabled by default. To disable it, set the RibbonControl.AllowCustomization property to false.
While an application containing a RibbonControl runs, right-click the free space within the Ribbon Control. Select the Customize Ribbon item from the context menu.
Customization will take no effect if RibbonControl’s layout is generated based on the RibbonControl.CategoriesSource, RibbonPageCategoryBase.PagesSource, RibbonPage.GroupsSource or RibbonPageGroup.ItemLinksSource properties.
The Ribbon customization window has the ListBox that contains commands (BarItems) on the left and the ListBox that contains tabs (RibbonPages) on the right. The ComboBox filter at the top of each ListBox allows you to specify which commands and tabs are displayed. For example, applying the ‘Main Tabs’ filter within the right ListBox will cause the displaying of items within the RibbonDefaultPageCategory only, and the applying of the ‘Tool Tabs’ filter displays items of the RibbonPageCategory type.
Below is a list of operations available through the Ribbon Customization feature.
Add new pages
Add new groups
Hide pages and page groups
Rename pages and page groups
Add commands to custom page groups
Note: by default, adding commands to the original page groups is not allowed. Set the RibbonControl.AllowCustomizingDefaultGroups to true to change this behavior.
Re-arrange pages and page groups
Import/Export your custom layout
Note: if ‘Export all customizations’ option is selected, your custom layout will be applied automatically as if you clicked the ‘Apply Changes’ button.
Restore the original layout
The following animation is a short example of customizing a RibbonControl.