Skip to main content
A newer version of this page is available. .

DashboardToolbarItem Class

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

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v19.1.Win.dll

Declaration

public class DashboardToolbarItem :
    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:

Component Event
DashboardViewer CustomizeDashboardTitle, CustomizeDashboardItemCaption
DashboardDesigner CustomizeDashboardTitle, CustomizeDashboardItemCaption

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:

// 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);

Note

The complete sample project WinForms Dashboard - How to customize the dashboard title and dashboard item captions is available in the DevExpress Examples repository.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DashboardToolbarItem class.

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.

Inheritance

Object
DashboardToolbarItem
See Also