dashboard-devexpress-dot-dashboardwin-dot-dashboarddesignerbarextensions-dot-getdashboardribbonpage-x28-devexpress-dot-xtrabars-dot-ribbon-dot-ribboncontrol-system-dot-type-devexpress-dot-dashboardwin-dot-dashboardribbonpage-x29.md
Returns a page from the Ribbon toolbar used in the Dashboard Designer.
Namespace : DevExpress.DashboardWin
Assembly : DevExpress.Dashboard.v25.2.Win.dll
NuGet Package : DevExpress.Win.Dashboard
public static RibbonPage GetDashboardRibbonPage(
this RibbonControl ribbonControl,
Type customItemMetadataType,
DashboardRibbonPage page
)
<ExtensionAttribute>
Public Shared Function GetDashboardRibbonPage(
ribbonControl As RibbonControl,
customItemMetadataType As Type,
page As DashboardRibbonPage
) As RibbonPage
| 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.
|
| Type | Description |
|---|---|
| RibbonPage |
A Ribbon page that meets the specified parameters.
|
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);
}
}
}
Imports DevExpress.DashboardWin
Imports DevExpress.XtraBars
Imports DevExpress.XtraBars.Ribbon
Imports System.Windows.Forms
Namespace TutorialsCustomItems
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
dashboardDesigner1.CreateRibbon()
dashboardDesigner1.LoadDashboard("..\..\Data\TutorialCustomItems.xml")
dashboardDesigner1.CreateCustomItemBars()
RemoveDrillDownBarItem()
End Sub
Private Sub RemoveDrillDownBarItem()
Dim page As RibbonPage = dashboardDesigner1.Ribbon.GetDashboardRibbonPage(GetType(SimpleTableMetadata), DashboardRibbonPage.Data)
Dim interactivityGroup As RibbonPageGroup = page.Groups(1)
Dim drillDownBarItem As BarItem = interactivityGroup.ItemLinks(2).Item
interactivityGroup.ItemLinks.Remove(drillDownBarItem)
End Sub
End Class
End Namespace
See Also
DashboardDesignerBarExtensions Class