Skip to main content
All docs
V24.1

DashboardDesignerBarExtensions.GetDashboardRibbonPage(RibbonControl, Type, DashboardRibbonPage) Method

Returns a page from the Ribbon toolbar used in the Dashboard Designer.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v24.1.Win.dll

NuGet Package: DevExpress.Win.Dashboard

Declaration

public static RibbonPage GetDashboardRibbonPage(
    this RibbonControl ribbonControl,
    Type customItemMetadataType,
    DashboardRibbonPage page
)

Parameters

Name Type Description
ribbonControl RibbonControl

A Ribbon toolbar used in the Dashboard Designer.

customItemMetadataType Type

A metadata type that corresponds to a CustomItemMetadata class descendant.

page DashboardRibbonPage

A Ribbon page.

Returns

Type Description
RibbonPage

A Ribbon page that meets the specified parameters.

Remarks

Use the GetDashboardRibbonPage method to identify a Ribbon page.

The following code snippet shows how to remove a bar item from the Ribbon’s Data contextual page for the custom Simple Table item:

using DevExpress.DashboardWin;
using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;
using System.Windows.Forms;

namespace TutorialsCustomItems {
    public partial class Form1 : Form {
      public Form1() {
          InitializeComponent();
          dashboardDesigner1.CreateRibbon();
          dashboardDesigner1.LoadDashboard(@"..\..\Data\TutorialCustomItems.xml");
          dashboardDesigner1.CreateCustomItemBars();
          RemoveDrillDownBarItem();
      }

      void RemoveDrillDownBarItem() {
            RibbonPage page = dashboardDesigner1.Ribbon.GetDashboardRibbonPage(typeof(SimpleTableMetadata), DashboardRibbonPage.Data);
            RibbonPageGroup interactivityGroup = page.Groups[1];
            BarItem drillDownBarItem = interactivityGroup.ItemLinks[2].Item;
            interactivityGroup.ItemLinks.Remove(drillDownBarItem);
        }
    }
}
See Also