Create a WinForms Dashboard Application in .NET Core 3
- 2 minutes to read
This tutorial describes how to create a WinForms application with the Dashboard control in .NET Core 3.
Prerequisites
- Core 3 SDK
- DevExpress .NET Core 3 Desktop Products
- DevExpress .NET Products v.20.1
- Visual Studio 2019 v16.3 or later
Create a new project
You can create a new .NET Core project in the console window or use Visual Studio’s template.
Create a New .NET Core Project in the Console Window
Open the console window and perform the following steps:
Create and open a new folder. The folder name is the project name.
mkdir NewCoreApp cd NewCoreApp
Create a WinForms project:
dotnet new winforms
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 Core Project in Visual Studio
In Visual Studio, create a new project and select Windows Forms App (.NET Core) on the start page as the project template.
Install Dashboard packages
Select Manage NuGet Packages in the invoked context menu to invoke the NuGet Package Manager.
Register the DevExpress NuGet feed as a package source and select it in the drop-down menu.
Install the DevExpress.WindowsDesktop.Win.Dashboard package.
The installed libraries are added to the project after installation is completed.
Create a New WinForms Dashboard
To create the Dashboard Designer, add the following code in a Form1.cs file:
using System.Windows.Forms;
using DevExpress.DashboardWin;
//...
DashboardDesigner designer = new DashboardDesigner();
this.Controls.Add(designer);
designer.Dock = DockStyle.Fill;
designer.CreateRibbon();
Run the application and configure your dashboard in the Designer. Follow this step-by-step tutorial for more information: How to create a dashboard in the WinForms Designer.
You can use the DashboardDesigner.LoadDashboard method to load an existing dashboard in code.