RibbonControl.Categories Property
A collection of categories used within the current RibbonControl.
Namespace: DevExpress.Xpf.Ribbon
Assembly: DevExpress.Xpf.Ribbon.v14.2.dll
#Declaration
[XtraSerializableProperty(XtraSerializationVisibility.Collection, true, false, true, 0, XtraSerializationFlags.None)]
public RibbonPageCategoryCollection Categories { get; protected set; }
#Property Value
Type | Description |
---|---|
DevExpress. |
A DevExpress. |
#Remarks
Ribbon's categories define sets of pages that will be displayed if a category is active. There is always a default page category, which holds default pages displayed, whatever actions a user performs. You can define your own page categories in order to display page tabs if desired. For example, Microsoft Office Word 2010 displays contextual pages for formatting and customizing images when you select an image within a document. Refer to the Ribbon Page Categories and Contextual Pages article to learn more.
The Categories collection stores all existing categories used in your application. It always contains at least one category - a default, presented by the RibbonDefaultPageCategory class. Custom categories are presented by the RibbonPageCategory class.
The Categories property is marked with the System.Windows.Markup.ContentPropertyAttribute attribute, so categories defined between the RibbonControl opening and closing tags are automatically placed inside the Categories collection. See the example below to learn how to add a custom category.
#Examples
This example shows how to create a custom page category. This category is hidden by default. It's made visible when clicking a dedicated button.
The following image shows the result: