dashboard-devexpress-dot-dashboardwin-dot-dashboarddesigner-dot-createcustomitembars-x28-system-dot-type-x29.md
Adds custom item bars to the Ribbon.
Namespace : DevExpress.DashboardWin
Assembly : DevExpress.Dashboard.v25.2.Win.dll
NuGet Package : DevExpress.Win.Dashboard
public void CreateCustomItemBars(
params Type[] customItemMetadataTypes
)
Public Sub CreateCustomItemBars(
ParamArray customItemMetadataTypes As Type()
)
| Name | Type | Description |
|---|---|---|
| customItemMetadataTypes | Type[] |
A metadata type that corresponds to a CustomItemMetadata class descendant.
|
The CreateCustomItemBars method inserts a custom item’s bar into the Ribbon. Before you add a bar, make sure that you have registered the corresponding metadata type and created the Ribbon.
Call the CreateCustomItemBars method to add bars for all custom items whose metadata is registered. To add bars for the corresponding custom items, pass their metadata as the customItemMetadataTypes parameter.
using System.Windows.Forms;
using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
namespace TutorialsCustomItems {
public partial class Form1 : Form {
public Form1(){
InitializeComponent();
dashboardDesigner1.CreateRibbon();
dashboardDesigner1.CreateCustomItemBars();
}
}
}
Imports System.Windows.Forms
Imports DevExpress.DashboardCommon
Imports DevExpress.DashboardWin
Namespace CustomItemsSample
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
dashboardDesigner1.CreateRibbon()
dashboardDesigner1.CreateCustomItemBars()
End Sub
End Class
End Namespace
The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateCustomItemBars(Type[]) method.
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.
AttachDashboardControl(designer);
designer.CreateCustomItemBars(typeof(SankeyItemMetadata));
RemoveDrillDownBarItem(designer);
winforms-dashboard-custom-items/CS/TutorialsCustomItems/Form1.cs#L17
dashboardDesigner1.LoadDashboard(@"..\..\Data\TutorialCustomItems.xml");
dashboardDesigner1.CreateCustomItemBars();
dashboardDesigner1.CustomizeExportDocument += dashboardDesigner1_CustomizeExportDocument;
winforms-dashboard-trend-line-indicators/CS/WinformsIndicator/FormDesigner.cs#L30
dashboardDesigner.CreateRibbon();
dashboardDesigner.CreateCustomItemBars();
}
AttachDashboardControl(designer)
designer.CreateCustomItemBars(GetType(TreeListItemMetadata))
RemoveDrillDownBarItem(designer)
winforms-dashboard-custom-items/VB/TutorialsCustomItems/Form1.vb#L14
dashboardDesigner1.LoadDashboard("..\..\Data\TutorialCustomItems.xml")
dashboardDesigner1.CreateCustomItemBars()
AddHandler dashboardDesigner1.CustomizeExportDocument, AddressOf dashboardDesigner1_CustomizeExportDocument
winforms-dashboard-trend-line-indicators/VB/WinformsIndicator/FormDesigner.vb#L32
dashboardDesigner.CreateRibbon()
dashboardDesigner.CreateCustomItemBars()
End Sub
See Also