Skip to main content

Create a WPF Dashboard Viewer (.NET)

  • 2 minutes to read

This tutorial describes how to create the WPF application with the DashboardControl in .NET 6 and later.

Prerequisites

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:

  1. Create and open a new folder. The folder name is the project name.

    mkdir NewCoreApp
    cd NewCoreApp
    
  2. Create a WPF project:

    dotnet new wpf
    
  3. Create a solution file:

    dotnet new sln
    
  4. Add the created .NET project to this solution:

    dotnet sln add NewCoreApp.csproj
    

Open the created solution in Visual Studio.

Create a New .NET Project in Visual Studio

  1. In Visual Studio, create a new project and select WPF App on the start page as the project template.

    Create a new project

  2. In the next dialog window, select the target framework.

Install the Dashboard Packages

  1. Right-click the Dependencies node in the Solution Explorer and select Manage NuGet Packages in the invoked context menu.

    Manage NuGet packages

  2. Register the DevExpress NuGet feed as a package source and select it in the drop-down menu.

  3. Select the DevExpress NuGet feed as a package source drop-down list and go to the Browse page. Install the DevExpress.Wpf.Dashboard package.

    Install NuGet packages

The installed libraries are added to the project after installation is complete.

Installed libraries

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.

Next Steps

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.

Display a Dashboard in the WPF Dashboard Viewer

WPF Viewer - describes how to use DashboardControl to display a dashboard in a WPF application.