We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to prepare car dashboard demo using SfCircularGauge

Platform: WPF |
Control: SfCircularGauge

This article explains how to prepare a car dashboard demo using WPF SfCircularGauge control.

 

Car dashboard demo

  

Step 1: Create multiple circular gauges to display the Speed, RPM, Torque, Temperature, and Fuel values, and arrange them in the Grid layout to design it as a car dashboard.

 

Step 2: Set the DataContext in the XAML code to bind the properties from the ViewModel.

 

Step 3: Create a ViewModel that implements NotificationObject so that the view gets the notification when the ViewModel’s properties are changed. Add necessary properties in the ViewModel to update the Speed, RPM, Torque, Temperature, and Fuel gauge values.

 

Step 4: In the ViewModel, write the logic to update pointer values every 10 seconds using DispatcherTimer. Once the fuel value reaches zero, then restart the entire logic.

 

[C#]:

private DispatcherTimer timer;
//////     
 
timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 0, 10);
timer.Tick += timer_Tick;
  
//////
 
void timer_Tick(object sender, object e) 
{
   //code to update pointer values
}

 

View the sample from GitHub

 

See also

 

Getting started with a circular gauge

 

Setting start and sweep angles for scale

 

Tick customizations in circular gauge

 

Needle pointer customizations in circular gauge

 

 

 

2X faster development

The ultimate WPF UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile