RibbonControl.Pages Property
Provides access to the Ribbon Control’s main pages.
Namespace: DevExpress.XtraBars.Ribbon
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[Browsable(false)]
[XtraSerializableProperty(false, true, false)]
public RibbonPageCollection Pages { get; }
Property Value
Type | Description |
---|---|
RibbonPageCollection | A RibbonPageCollection object that represents the collection of main pages. |
Remarks
RibbonControl pages belong to either the default or custom page categories. Pages that belong to the default category are considered to be the main pages of a Ribbon application, while pages that belong to custom categories are designed to provide context-dependent commands. These pages should not be visible all the time and displayed only when necessary.
The Pages
collection stores the “main” pages that belong to the default category. These pages are also called unassigned, as they are not explicitly associated with any custom category. The default category can be accessed with the RibbonControl.DefaultPageCategory property. Its RibbonPageCategory.Pages property returns the collection of unassigned pages (the same value as the Pages
property).
Use the Pages
property to add, remove, or access the RibbonControl’s “main” pages.
The Ribbon Control also allows contextual tab pages to be implemented, as in the Microsoft Office 2007 UI. To create a contextual tab page, first create a custom category (a RibbonPageCategory object) and add it to the RibbonControl.PageCategories property. Next, create a Ribbon page that will represent the contextual tab, and add it to the category’s RibbonPageCategory.Pages collection. See Categories and Contextual Tabs to learn more.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Pages property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.