Load a Dashboard
You can use one of the following approaches to load the dashboard to the Dashboard Viewer.
Create a dashboard in the DashboardDesigner and save its definition to an XML file. To open the saved dashboard, click the DashboardViewer‘s smart tag button and select Load Dashboard… in the Dashboard Source drop-down menu, to locate the required dashboard XML file.
In code, use the DashboardViewer.DashboardSource property to specify the path to the dashboard XML file or call the DashboardViewer.LoadDashboard method.
Create a dashboard in the Visual Studio Dashboard Designer. To open the project dashboard, click the control’s smart tag button, click the Dashboard Source drop-down arrow, and select the dashboard listed under Project Dashboards.
You can assign the type of the created dashboard to the DashboardViewer.DashboardSource property.
- Create the dashboard at runtime and assign its instance (the Dashboard object) to the DashboardViewer.Dashboard property.
If the DashboardDesigner / DashboardViewer control is placed in the MDI child form, load dashboards in the Shown event handler instead of Load.
|DashboardViewer.DashboardSource||Gets or sets a dashboard supplier for the DashboardViewer.|
|DashboardViewer.LoadDashboard||Loads a dashboard from a file or stream.|
|DashboardViewer.DashboardLoaded||Occurs after the dashboard is loaded to the DashboardViewer.|