dashboard-devexpress-dot-dashboardcommon-dot-dashboarditem-07e5b339.md
Gets or sets the name of the dashboard item, displayed in its caption.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
[DefaultValue(null)]
public string Name { get; set; }
<DefaultValue(Nothing)>
Public Property Name As String
| Type | Default | Description |
|---|---|---|
| String | null |
A String that specifies the name of the dashboard item.
|
The Name is displayed in the dashboard item caption. It does not have to be unique.
The ComponentName identifies a dashboard item in a dashboard container. It has to be unique in the dashboard.
Tip
Set the DashboardDesigner.AllowEditComponentName property to true to allow changing the item’s ComponentName in the dashboard designer, as shown in the picture below.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Name 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.
winforms-dashboard-designer-merge-dashboards-to-tabs/CS/DashboardMerger/DashboardMerger.cs#L64
DashboardTabPage tabPage = TabContainer.CreateTabPage();
tabPage.Name = TargetDashboard.Title.Text;
DashboardLayoutTabPage layoutPage = new DashboardLayoutTabPage(tabPage);
string selectedTabPageName = e.Page;
dashboardViewer.Dashboard.Title.Text = TabContainer.TabPages[selectedTabPageName].Name;
}
foreach (var item in viewer.Dashboard.Items) {
DashboardToolbarMenuItem menuItem = new DashboardToolbarMenuItem(item.ShowCaption, item.Name,
new Action<DashboardToolbarItemClickEventArgs>((args) => {
win-viewer-map-custom-shape-file/CS/WindowsFormsMapCustomShape/Form1.cs#L25
ChoroplethMapDashboardItem map = new ChoroplethMapDashboardItem();
map.Name = "Choropleth Map";
map.DataSource = excelDataSource;
winforms-dashboard-window-calculation-example/CS/WindowCalculationExample/TabPageLoadHelper.cs#L106
itemCopy.ComponentName = GetNameOnNextPage(item.ComponentName);
itemCopy.Name = GetNameOnNextPage(item.Name);
itemCopy.ParentContainer = itemContainer;
winforms-dashboard-designer-merge-dashboards-to-tabs/VB/DashboardMerger/ItemsMerger.vb#L93
groupCopy.InteractivityOptions.IsMasterFilter = group.InteractivityOptions.IsMasterFilter
groupCopy.Name = group.Name
groupCopy.ShowCaption = group.ShowCaption
Dim selectedTabPageName As String = e.Page
dashboardViewer.Dashboard.Title.Text = Me.TabContainer.TabPages(selectedTabPageName).Name
End If
For Each item In viewer.Dashboard.Items
Dim menuItem As DashboardToolbarMenuItem = New DashboardToolbarMenuItem(item.ShowCaption, item.Name, New Action(Of DashboardToolbarItemClickEventArgs)(Sub(args)
item.ShowCaption = Not item.ShowCaption
win-viewer-map-custom-shape-file/VB/WindowsFormsMapCustomShape/Form1.vb#L23
Dim map As ChoroplethMapDashboardItem = New ChoroplethMapDashboardItem()
map.Name = "Choropleth Map"
map.DataSource = excelDataSource
winforms-dashboard-window-calculation-example/VB/WindowCalculationExample/TabPageLoadHelper.vb#L120
itemCopy.ComponentName = GetNameOnNextPage(item.ComponentName)
itemCopy.Name = GetNameOnNextPage(item.Name)
itemCopy.ParentContainer = itemContainer
See Also