Create, View and Modify Dashboards in a WinForms Application
- 2 minutes to read
This topic describes how to create and view a dashboard at runtime in a WinForms application when the Dashboards Module is added.
In the Navigation, open the Reports group, choose the Dashboards item and click New.
In the invoked Data Source Wizard, select XAF Object Data Source and click Next.
Then, choose the business object type to be used as the dashboard data source and click Finish.
In the types list, you can see the types that have the DefaultClassOptionsAttribute or VisibleInDashboardsAttribute applied, or have the IModelClassDashboardsVisibility.IsVisibleInDashboards property set to true.
To display localized values of an enumeration property in a dashboard, add a calculated field to the data source class. Set this field's IModelMember.Expression to GetEnumCaption([Enum Property]). In the dashboard designer, bind items to this calculated field instead of the enumeration property.
After a dashboard is saved in the designer, it is added to the Dashboards List View. You can double-click a dashboard to view it.
In a WinForms application, you can access dashboards added in an ASP.NET application, and visa versa.
To modify an existing dashboard, select it and click the ShowDashboardDesigner Action in the toolbar or ribbon bar.
This Action is also available in the context menu.