Back to Devexpress

DashboardToolbarItem Class

dashboard-devexpress-dot-dashboardwin-1c4b9513.md

latest3.9 KB
Original Source

DashboardToolbarItem Class

An element, contained in the dashboard title or dashboard item caption, such as a command button.

Namespace : DevExpress.DashboardWin

Assembly : DevExpress.Dashboard.v25.2.Win.dll

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
public class DashboardToolbarItem :
    IDashboardToolbarItem,
    IDisposable
vb
Public Class DashboardToolbarItem
    Implements IDashboardToolbarItem,
               IDisposable

Remarks

Elements of this type are command buttons located in the dashboard title or dashboard item caption. They are contained in the e.Items collection accessible in the following event handlers:

ComponentEvent
DashboardViewerCustomizeDashboardTitle, CustomizeDashboardItemCaption
DashboardDesignerCustomizeDashboardTitle, CustomizeDashboardItemCaption

View Example: WinForms Dashboard - How to customize the dashboard title and dashboard item captions

To add a new command button to the dashboard title or dashboard item caption, handle the related event, create a new DashboardToolbarItem instance, specify its characteristics and insert it into the e.Items collection:

csharp
// Add a button to navigate to the company site.
DashboardToolbarItem infoLinkItem = new DashboardToolbarItem("",
    new Action<DashboardToolbarItemClickEventArgs>((args) => {
        System.Diagnostics.Process.Start("https://www.devexpress.com/");
    }));
infoLinkItem.SvgImage = svgImageCollection1["support"];
e.Items.Insert(0,infoLinkItem);
vb
' Add a button to navigate to the company site.
Dim infoLinkItem As DashboardToolbarItem = New DashboardToolbarItem("", New Action(Of DashboardToolbarItemClickEventArgs)(Sub(args)
    System.Diagnostics.Process.Start("https://www.devexpress.com/")
End Sub))
infoLinkItem.SvgImage = svgImageCollection1("support")
e.Items.Insert(0,infoLinkItem)

Implements

IDashboardToolbarItem

Inheritance

Object DashboardToolbarItem

See Also

DashboardToolbarItem Members

Dashboard Title in the WinForms Designer

Dashboard Item Caption in the WinForms Designer

Title and Item Captions

DevExpress.DashboardWin Namespace