The requested page is not available for the requested platform. You are viewing the content for Default platform.

Creating and Loading a Dashboard

  • 2 min to read

After adding the DashboardControl to a Window, you can display an existing dashboard or create a new dashboard using the Dashboard Designer in Visual Studio. To do this, click the control's smart tag and select the Set Dashboard Source command.


Next, select one of the following commands in the invoked menu:


Create New Dashboard

Clicking the Create New Dashboard menu item invokes the Dashboard Designer.


Here you can create a new dashboard or load an existing dashboard from an XML file. See Creating Dashboards in the Visual Studio Designer for more information.

After you have created a dashboard, the DashboardControl initializes the DashboardControl.DashboardSource property as follows:

<dxdash:DashboardControl DashboardSource="{x:Type local:Dashboard1}"/>

Load from XML

The Load from XML command allows you to load an existing dashboard XML file. For instance, you can load a dashboard created in the WinForms Dashboard Designer.

The code sample below demonstrates how to load a dashboard from an XML file:

<dxdash:DashboardControl DashboardSource="C:\Temp\Dashboard.xml"/>

You can also specify a relative path to a dashboard file placed in the current project...

<dxdash:DashboardControl DashboardSource="..\..\Dashboard.xml"/>

... or use pack URI:

<dxdash:DashboardControl DashboardSource="pack://application:,,,/Dashboard.xml"/>

Member Table

API Description
DashboardControl.DashboardSource Gets or sets a dashboard source for the DashboardControl.
DashboardControl.LoadDashboard Loads a dashboard from a stream.
DashboardControl.Dashboard Gets or sets the opened dashboard.