Back to Devexpress

DashboardViewer.Dashboard Property

dashboard-devexpress-dot-dashboardwin-dot-dashboardviewer-ad99489b.md

latest7.4 KB
Original Source

DashboardViewer.Dashboard Property

Gets or sets the currently opened dashboard.

Namespace : DevExpress.DashboardWin

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

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
[Browsable(false)]
public Dashboard Dashboard { get; set; }
vb
<Browsable(False)>
Public Property Dashboard As Dashboard

Property Value

TypeDescription
Dashboard

A Dashboard object that is the currently opened dashboard.

|

Remarks

You can open a dashboard in one of the following ways.

All these actions raise the DashboardViewer.DashboardChanged event.

Note

You cannot use the same instance of the dashboard object in the DashboardDesigner and DashboardViewer controls at the same time. You can use the SaveToXml / LoadFromXml methods to create a copy of the dashboard object.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Dashboard 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-apply-conditional-formatting-to-grid-cells/CS/Dashboard_ConditionalFormatting_Grid/BarConditionForm.cs#L8

csharp
Dashboard dashboard = new Dashboard(); dashboard.LoadFromXml(@"..\..\Data\Dashboard.xml");
dashboardViewer1.Dashboard = dashboard;
GridDashboardItem grid = (GridDashboardItem)dashboard.Items["gridDashboardItem1"];

winforms-dashboard-create-layout-from-scratch/CS/Dashboard_LayoutCustomization/Form1.cs#L62

csharp
dashboardViewer1.Dashboard = dashboard;
}

winforms-dashboard-pass-dashboard-parameters-to-expression-format-condition-in-code/CS/Dashboard_ConditionalFormatting_Grid/Form1.cs#L8

csharp
Dashboard dashboard = new Dashboard(); dashboard.LoadFromXml(@"..\..\Data\Dashboard.xml");
dashboardViewer1.Dashboard = dashboard;
GridDashboardItem grid = (GridDashboardItem)dashboard.Items["gridDashboardItem1"];

winforms-dashboard-designer-bind-a-dashboard-to-a-list-object/CS/Dashboard_BindingToList/Form1.cs#L40

csharp
dashboard.Items.AddRange(pies, grid);
dashboardViewer1.Dashboard = dashboard;

winforms-dashboard-bind-geo-point-map-to-data-in-code/CS/Dashboard_CreateGeoPointMap/Form1.cs#L29

csharp
dashboard.Items.Add(geopointMap);
    dashboardViewer1.Dashboard = dashboard;
}

winforms-dashboard-apply-conditional-formatting-to-grid-cells/VB/Dashboard_ConditionalFormatting_Grid/BarConditionForm.vb#L12

vb
dashboard.LoadFromXml("..\..\Data\Dashboard.xml")
dashboardViewer1.Dashboard = dashboard
Dim grid As GridDashboardItem = CType(dashboard.Items("gridDashboardItem1"), GridDashboardItem)

winforms-dashboard-create-layout-from-scratch/VB/Dashboard_LayoutCustomization/Form1.vb#L50

vb
dashboardViewer1.Dashboard = dashboard
End Sub

winforms-dashboard-pass-dashboard-parameters-to-expression-format-condition-in-code/VB/Dashboard_ConditionalFormatting_Grid/Form1.vb#L11

vb
dashboard.LoadFromXml("..\..\Data\Dashboard.xml")
dashboardViewer1.Dashboard = dashboard
Dim grid As GridDashboardItem =

winforms-dashboard-designer-bind-a-dashboard-to-a-list-object/VB/Dashboard_BindingToList/Form1.vb#L44

vb
dashboard.Items.AddRange(pies, grid)
dashboardViewer1.Dashboard = dashboard

winforms-dashboard-bind-geo-point-map-to-data-in-code/VB/Dashboard_CreateGeoPointMap/Form1.vb#L30

vb
dashboard.Items.Add(geopointMap)
    dashboardViewer1.Dashboard = dashboard
End Sub

Implements

Dashboard

See Also

LoadDashboard

DashboardSource

DashboardChanged

DashboardViewer Class

DashboardViewer Members

DevExpress.DashboardWin Namespace