Back to Devexpress

RibbonControl.TotalPageCategory Property

windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-ribboncontrol-e8d439f7.md

latest2.9 KB
Original Source

RibbonControl.TotalPageCategory Property

Allows you to return all pages and visible pages owned by the RibbonControl.

Namespace : DevExpress.XtraBars.Ribbon

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public RibbonTotalPageCategory TotalPageCategory { get; }
vb
<Browsable(False)>
Public ReadOnly Property TotalPageCategory As RibbonTotalPageCategory

Property Value

TypeDescription
DevExpress.XtraBars.Ribbon.RibbonTotalPageCategory

A DevExpress.XtraBars.Ribbon.RibbonTotalPageCategory object that allows you to return all pages and visible pages owned by the RibbonControl.

|

Remarks

The members provided by the TotalPageCategory property allows you access all pages and only visible pages owned by the RibbonControl.

To get pages that belong to the Default Category , use the RibbonControl.DefaultPageCategory property. To access pages that belong to custom categories, see the RibbonControl.PageCategories property.

Example

The following code shows how to iterate through the collection of visible Ribbon pages.

To access a RibbonControl’s collection of visible pages, the RibbonControl.TotalPageCategory property is used. The object returned by this property allows you to access all pages and only visible pages.

csharp
using DevExpress.XtraBars.Ribbon;

ArrayList visiblePages = RibbonControl1.TotalPageCategory.GetVisiblePages();
foreach (RibbonPage page in visiblePages) {
    if (page.Text == "Selection") {
        page.Visible = false;
        break;
    }
}
vb
Imports DevExpress.XtraBars.Ribbon

Dim visiblePages As ArrayList = RibbonControl1.TotalPageCategory.GetVisiblePages()
For Each page As RibbonPage In visiblePages
    If page.Text = "Selection" Then
        page.Visible = False
        Exit For
    End If
Next

See Also

DefaultPageCategory

PageCategories

RibbonControl Class

RibbonControl Members

DevExpress.XtraBars.Ribbon Namespace