DCSIMG
WPF Toolkit Tutorial – Part 1 - Development Romance - Site Root - StudentGuru

WPF Toolkit Tutorial – Part 1

Recently, i decided to download the WPF Toolkit only to see its new controls. These new controls are:

  • DataGrid
  • DatePicker
  • Calendar
  • Data visualization controls (charts)

In this first part, we are going to see an example using charts, especially pie series.

After downloading the toolkit from the previous link, run the .msi file in order to install it and create a new WPF application project with visual studio.

Check the toolbox tab for the new controls:

toolbox

Add a Chart  control to the window:

window

Now, add PieSeries with XAML like this:

xaml

Now, it’s time to create the statistics objects. Begin by creating the following class:

partyClass

Then implement the Window_Loaded event and fill it with the following code:

code

Finally, change chart’s properties in order to “welcome” their new data:

newXaml

Build and run the project to see the results:

results