Among the producers of controls for these futuristic dashboards is Dundas Software's Dundas Gauge for .NET. Their variety of gauges gives you quite a choice of meters, dials, and indicators right at your fingertips. You can easily give your users the full visual performance overview with these impressive set of controls.
Figure 1 - Dundas Gauge Wizard
Installation
Installing Dundas Gauges evaluation copy to try is a fairly easy process. Just register on Dundas's website http://www.dundas.com and download the evaluation copy of the software. Upon registering, you will need to wait for a user name and password in an e-mail to activate the controls. Once you've received the control activation info, simply enter it into the user/password screen and you are ready to go. Dundas controls automatically install themselves into your Visual Studio environment.
Gauge Wizard
If you go into your Toolbox, you won't see several different controls listed for Dundas Gauges as you might expect. In fact you will only see one control called GaugeContainer as shown in figure 2 below. The gauge container allows you to add multiple gauges inside of it and the gauge container will also lay out the controls you have added in a logical way.
Figure 2 - Toolbox listing of Dundas Controls
If you drag and drop this control into your form, it activates the Gauge Wizard shown in figure 1. This wizard gives you, the programmer, an easy point-and-click means of customizing the desired gauge for your project. And boy, when I say you can customize a gauge, you can alter just about anything about it. Of course you can change the obvious things, such as scale, range, and background color. You can also change the shape, the type of frame, the shape of the tick marks, the type of needle, the type of cap holding the needle, the input type (count, time, etc.), the sweep angle, and the thickness of the scale. You can also change the scales to linear or logarithmic. This fine control over the gauges attributes gives you a combination of almost infinite gauge creation. Figure 3 shows an example of three speedometers I was able to create on my Windows Form with the wizard without any coding:
Speedometers aren't the only instruments you can create with the Gauge Wizard. You can also create thermometers, level bar indicators, counters, and analog meters. Figure 4 shows you some of the variety of controls I was able to crank out with the wizard
Multiple Gauges
Although you can either create multiple gauges through the wizard using the Gauges tab, I chose to add multiple gauges through the properties Window in Visual Studio. Dundas separates each collection of gauges by shape. So for example, if I want to add three speedometers to my gauge container, I need to add them to the CircularGauges collection. I can use the property window of the gauge container to add 2 more speedometers as shown in figure 5:
Figure 5 - Using the CircularGauge Collection Editor to add more gauges to the container
By changing individual properties in the property grid, you can create three different gauges in the same container. The Dundas gauges are so flexible that you can create addition scales, additional ranges, and additional pointers as shown in figure 6. This is accomplished by clicking on the Scales, Ranges, or Pointers collection properties in the CircularGaugeCollection and adding the corresponding object.
Figure 6 - Gauges in the GaugeContainer with multiple pointers, scales, and ranges
Interactive Gauges
Almost all gauges can be made interactive by changing the Interactive property of the Pointer object inside the gauge to true. When the gauge is interactive, you can drag the needle or marker using the mouse through the range of the gauge. Below is an example of how you can change the pointer property of the first gauge in my gauge container of figure 6 to interactive inside my constructor.
Listing 1 - Making a Gauge Interactive
public Form1(){
//// Required for Windows Form Designer support//
InitializeComponent();
// make the first gauge pointer of the first gauge of the GaugeContainer interactivegaugeContainer1.CircularGauges[0].Pointers[0].Interactive =
}
Responding to Events from the Gauge
Dundas gauges have the ability to respond to events from the value of the needle in your gauge. For example, if your needle is headed into the danger zone (e.g. power overload), you may want to trigger a siren or something to let the user know that your needle has ventured into unfavorable territory. There are several range events that allow you to create event handlers to respond to them. These events include PointerRangeEnter, PointerRangeLeave, PointerRangeTimeOut, and ValueLimitOverflow. Below is an example of responding to an event where the needle has entered the danger zone in gauge #0.
private void gaugeContainer1_PointerRangeEnter(object sender, Dundas.Gauges.WinControl.ValueRangeEventArgs e) { if (e.Pointer.ParentElement.Name =="Gauge0") { // sound alarm PlaySiren(); }
Dundas Controls on the Web
Dundas provides two different packages for their gauge controls. One is for gauges on Windows Forms and the other is for gauges on the Web. The web gauges seem to have most of the functionality you get from the Windows Forms Controls and you can create all your gauges on your web page with the same gauge wizard as shown in figure 1. Although I haven't played around with the Web Gauges as much as I did the Window Form gauges, I could judge that the development procedure was just as effortless. Simply drag the gauge container WebForm control into your aspx server page and the gauge wizard again appears so you can perform your design magic. You may have to some minor additional chores, such as adjust your security settings for your virtual pages, but for the most part, the development effort is the same:
Figure 7 - Dundas Circular Gauge Sample on an ASP.NET Web Page
Cons
There are few cons with the gauge controls and they are fairly minor. Occasionally I would see an overlap of numbers in a few of the linear controls, although I was able to easily adjust them by playing with the scale. I would also say that the wizard takes a little getting used to using. Because the wizard is so feature rich, it tends to be a bit complex with numerous tabs, button navigators, and trees, but I was quickly able to get a handle on its intricacies and was soon on my way. The help file in places is a bit sparse and can use some sprucing up with examples, but I suspect that Dundas will be providing many examples on their website.
Conclusion
All in all, with the tight integration of the gauges into Visual Studio and the ease of creating gauges and manipulating their properties through the wizard and through Visual Studio, and the pure aesthetic look and feel of the gauges, I would say that we may be looking at a level of quality for control creation that will be hard to surpass. I can really appreciate Dundas's effort to make these controls look as real as the controls you find on your car or gas meter and their effort in giving you the ability to duplicate all the gauges you encounter in the world. You may say that this is an effort other control companies whether virtual or mechanical are going to find hard to gauge.