Back to Devexpress

DashboardItem.ShowCaption Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboarditem-5ef1952f.md

latest6.4 KB
Original Source

DashboardItem.ShowCaption Property

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

Declaration

csharp
public bool ShowCaption { get; set; }
vb
Public Property ShowCaption As Boolean

Property Value

TypeDescription
Boolean

true , to show the caption; otherwise, false.

|

Remarks

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.

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

csharp
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

csharp
// Hide captions.
dashboard.Items.ForEach(item => item.ShowCaption = false);
dashboard.Groups.ForEach(item => item.ShowCaption = false);

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) => {

winforms-dashboard-designer-merge-dashboards-to-tabs/CS/DashboardMerger/ItemsMerger.cs#L88

csharp
groupCopy.Name = group.Name;
groupCopy.ShowCaption = group.ShowCaption;
return groupCopy;

winviewer-how-to-create-custom-card-layout-template/CS/ViewerForm.cs#L31

csharp
cardItem.DataSource = dataSource;
cardItem.ShowCaption = false;

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

vb
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

vb
' Hide captions.
dashboard.Items.ForEach(Sub(item) item.ShowCaption = False)
dashboard.Groups.ForEach(Sub(item) item.ShowCaption = False)

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

winforms-dashboard-designer-merge-dashboards-to-tabs/VB/DashboardMerger/ItemsMerger.vb#L94

vb
groupCopy.Name = group.Name
groupCopy.ShowCaption = group.ShowCaption
Return groupCopy

winviewer-how-to-create-custom-card-layout-template/VB/ViewerForm.vb#L27

vb
cardItem.DataSource = dataSource
cardItem.ShowCaption = False

See Also

DashboardItem Class

DashboardItem Members

DevExpress.DashboardCommon Namespace