DashboardViewer.DashboardSource Property

Gets or sets a dashboard supplier for the DashboardViewer.

Namespace: DevExpress.DashboardWin

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

Declaration

public object DashboardSource { get; set; }
Public Property DashboardSource As Object

Property Value

Type Default Description
Object

null

A Object value specifying a dashboard supplier for the DashboardViewer.

Remarks

There are two ways to provide a dashboard to be opened in the DashboardViewer using the DashboardSource property.

  1. Using a dashboard XML definition.

    Assign the string containing the absolute or relative path to the dashboard XML file to the DashboardSource property...

    dashboardViewer1.DashboardSource = @"..\..\Data\Dashboard.xml";
    

    ...or provide a dashboard XML file using a Uri class instance.

    dashboardViewer1.DashboardSource = new Uri(@"..\..\Data\Dashboard.xml", UriKind.Relative);
    
  2. Using a dashboard created at design time.

    Assign the type of this dashboard to the DashboardSource property...

    dashboardViewer1.DashboardSource = typeof(Dashboard1);
    

    ...or use the string containing the dashboard class name.

    dashboardViewer1.DashboardSource = "WindowsFormsApplication1.Dashboard1";
    
Note

If the DashboardDesigner / DashboardViewer control is placed in the MDI child form, load dashboards in the Shown event handler instead of Load.

See Also