Presenting data to users can be done in a variety of ways, but gauges offer a unique way to present data with elegance. Gauges are easily recognized by most users since they see them on a daily basis. Think about when you drove to work this morning, you probably looked at your car dashboard which may have looked similar to the picture below. You knew your speed, fuel status and a number of other important metrics at a glance. Well, the RadGauge for WPF gives you the ability to implement this same powerful concept in your applications
In this post, I want to show you the basics of getting setup with a RadGauge for WPF. After creating a new WPF application, I placed a RadGauge on my window.
Initially, you will notice that RadGauge does not display anything. That is because you have to define a few more details about the gauge. The first thing you need to define is whether you want a Linear or Radial gauge. For my example, I want to demonstrate how to setup a Radial Gauge.
If you look at the code below, I have indicated that my RadGauge will be a RadialGauge by simply adding the <telerik:RadialGauge> section to my XAML.
I now see the beginnings of my gauge in design view, but I need the numbers on the outisde of my gauge. This is accomplished though adding the <telerik:RadialScale> section to my XAML, as shown below.
So in just a few seconds of coding, I am almost done with a basic RadGauge in my application. My final touch is to add an indicator to the gauge to point to the appropriate values. So my next step is to add a single needle indicator to my gauge.
Now we have all the components necessary for our RadGauge to live in our application. The only thing left to do is have the indicator show the proper value in the gauge. You will see below that I have set the 'Value' property of the needle to 55 and it is displayed properly in the RadGauge.
Obviously you would not necessarily be hard coding the value in your applications so the RadGauge allows binding through the DataContext property. And there you have it, you can put a RadGauge in your applications in a matter of minutes. Of course, there are a number of features that I have not mentioned, but this will get you started working with the RadGauge.