Create a WPF Dashboard Viewer (.NET)
- 2 minutes to read
This tutorial describes how to create the WPF application with the DashboardControl in .NET 5 (and .NET Core 3.1).
- DevExpress Universal v.23.1.
- Visual Studio 2019 v16.8 or later with the .NET desktop development workload.
Create a New Project
You can create a new .NET project in the console window or use Visual Studio’s template.
Create a New .NET Project in the Console Window
Open the console window and follow the steps below:
Create and open a new folder. The folder name is the project name.
mkdir NewCoreApp cd NewCoreApp
Create a WPF project:
dotnet new wpf
Create a solution file:
dotnet new sln
Add the created .NET Core 3 project to this solution:
dotnet sln add NewCoreApp.csproj
Open the created solution in Visual Studio.
Create a New .NET Project in Visual Studio
In Visual Studio, create a new project and select WPF App on the start page as the project template.
In the next dialog window, select the target framework.
Install the Dashboard Packages
Right-click the Dependencies node in the Solution Explorer and select Manage NuGet Packages in the invoked context menu.
Register the DevExpress NuGet feed as a package source and select it in the drop-down menu.
Select the DevExpress NuGet feed as a package source drop-down list and go to the Browse page. Install the DevExpress.Wpf.Dashboard package.
The installed libraries are added to the project after installation is complete.
Add a WPF Dashboard Viewer
Add the DashboardControl to the MainWindow.xaml file and build the solution.
<Window x:Class="NewWpfApp.MainWindow" ... xmlns:dxdash="http://schemas.devexpress.com/winfx/2008/xaml/dashboard"> <Grid> <dxdash:DashboardControl/> </Grid> </Window>
Use the DashboardControl.DashboardSource property to load an existing dashboard or follow the instructions below for information on how to create and edit a dashboard in a .NET Project.
Create and Edit a Dashboard in a .NET Project
Create a Dashboard in Visual Studio (.NET) - shows how to create and edit a dashboard in Visual Studio at design time.