Back to Devexpress

DashboardItem.Name Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboarditem-07e5b339.md

latest6.9 KB
Original Source

DashboardItem.Name Property

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

Declaration

csharp
[DefaultValue(null)]
public string Name { get; set; }
vb
<DefaultValue(Nothing)>
Public Property Name As String

Property Value

TypeDefaultDescription
Stringnull

A String that specifies the name of the dashboard item.

|

Remarks

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

csharp
DashboardTabPage tabPage = TabContainer.CreateTabPage();
tabPage.Name = TargetDashboard.Title.Text;
DashboardLayoutTabPage layoutPage = new DashboardLayoutTabPage(tabPage);

winforms-dashboard-viewer-tab-navigation-buttons-tab-animation/CS/DashboardNextPrevTab/ViewerForm.cs#L91

csharp
string selectedTabPageName = e.Page;
    dashboardViewer.Dashboard.Title.Text = TabContainer.TabPages[selectedTabPageName].Name;
}

winforms-dashboard-customize-title-and-item-captions/CS/CustomizeDashboardItemCaptionExample/ViewerForm1.cs#L52

csharp
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

csharp
ChoroplethMapDashboardItem map = new ChoroplethMapDashboardItem();
map.Name = "Choropleth Map";
map.DataSource = excelDataSource;

winforms-dashboard-window-calculation-example/CS/WindowCalculationExample/TabPageLoadHelper.cs#L106

csharp
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

vb
groupCopy.InteractivityOptions.IsMasterFilter = group.InteractivityOptions.IsMasterFilter
groupCopy.Name = group.Name
groupCopy.ShowCaption = group.ShowCaption

winforms-dashboard-viewer-tab-navigation-buttons-tab-animation/VB/DashboardNextPrevTab/ViewerForm.vb#L100

vb
Dim selectedTabPageName As String = e.Page
    dashboardViewer.Dashboard.Title.Text = Me.TabContainer.TabPages(selectedTabPageName).Name
End If

winforms-dashboard-customize-title-and-item-captions/VB/CustomizeDashboardItemCaptionExample/ViewerForm1.vb#L55

vb
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

vb
Dim map As ChoroplethMapDashboardItem = New ChoroplethMapDashboardItem()
map.Name = "Choropleth Map"
map.DataSource = excelDataSource

winforms-dashboard-window-calculation-example/VB/WindowCalculationExample/TabPageLoadHelper.vb#L120

vb
itemCopy.ComponentName = GetNameOnNextPage(item.ComponentName)
itemCopy.Name = GetNameOnNextPage(item.Name)
itemCopy.ParentContainer = itemContainer

See Also

Dashboard Item Caption in the WinForms Designer

DashboardItem Class

DashboardItem Members

DevExpress.DashboardCommon Namespace