dashboard-devexpress-dot-dashboardcommon-dot-dashboarditem-5ef1952f.md
Gets or sets whether the dashboard item’s caption is displayed.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
public bool ShowCaption { get; set; }
Public Property ShowCaption As Boolean
| Type | Description |
|---|---|
| Boolean |
true , to show the caption; otherwise, false.
|
The caption is displayed at the top of the dashboard item and includes its DashboardItem.Name, along with other information, such as the name of the currently displayed set of elements (Gauge, Card or Pie), drill-down information, etc.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowCaption 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.
DashboardToolbarItem showTabHederItem = new DashboardToolbarItem(TabContainer.ShowCaption, "Show tab headers", ShowHideTabHeadersItemClick);
showTabHederItem.SvgImage = imageCollection["ShowCaption"];
winforms-dashboard-create-layout-from-scratch/CS/Dashboard_LayoutCustomization/Form1.cs#L27
// Hide captions.
dashboard.Items.ForEach(item => item.ShowCaption = false);
dashboard.Groups.ForEach(item => item.ShowCaption = false);
foreach (var item in viewer.Dashboard.Items) {
DashboardToolbarMenuItem menuItem = new DashboardToolbarMenuItem(item.ShowCaption, item.Name,
new Action<DashboardToolbarItemClickEventArgs>((args) => {
winforms-dashboard-designer-merge-dashboards-to-tabs/CS/DashboardMerger/ItemsMerger.cs#L88
groupCopy.Name = group.Name;
groupCopy.ShowCaption = group.ShowCaption;
return groupCopy;
winviewer-how-to-create-custom-card-layout-template/CS/ViewerForm.cs#L31
cardItem.DataSource = dataSource;
cardItem.ShowCaption = false;
e.Items.Insert(0, prevTabItem)
Dim showTabHederItem As DashboardToolbarItem = New DashboardToolbarItem(TabContainer.ShowCaption, "Show tab headers", AddressOf ShowHideTabHeadersItemClick)
showTabHederItem.SvgImage = imageCollection("ShowCaption")
winforms-dashboard-create-layout-from-scratch/VB/Dashboard_LayoutCustomization/Form1.vb#L25
' Hide captions.
dashboard.Items.ForEach(Sub(item) item.ShowCaption = False)
dashboard.Groups.ForEach(Sub(item) item.ShowCaption = False)
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
winforms-dashboard-designer-merge-dashboards-to-tabs/VB/DashboardMerger/ItemsMerger.vb#L94
groupCopy.Name = group.Name
groupCopy.ShowCaption = group.ShowCaption
Return groupCopy
winviewer-how-to-create-custom-card-layout-template/VB/ViewerForm.vb#L27
cardItem.DataSource = dataSource
cardItem.ShowCaption = False
See Also