Skip to main content
A newer version of this page is available. .

RibbonControl.Pages Property

Provides access to the Ribbon Control’s main pages.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v19.1.dll

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

The RibbonControl’s 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 dependant commands. These pages should not be visible all the time, but displayed only when necessary.

The Pages collection stores “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 via 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. Then 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.

The following code snippets (auto-collected from DevExpress Examples) contain references 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.

See Also