Gauging Reactions

23 May 2008

Man, I'm starting to think that TechEd is not going to be long enough for us to show off our new stuff. This morning, for example, with the help of RomanK from our WinForms team, I've been delving into XtraGauges, our new product for WinForms applications that enables you to display various types of gauges. Ray showed off screenshots from a very early demo here, and you can be sure that this will already look different at TechEd.

The XtraGauges product has been engineered from the outset to be multi-platform, with the first platform to be supported being WinForms. This initial release will be for DXperience v2008 vol.2 and will contain circular gauges (or, more accurately perhaps, gauges whose needles rotate around some point), linear gauges, and digital gauges. We hope to support ASP.NET in the next major release after that, v2008 vol.3. Other platforms, like Silverlight and WPF, are also under strong consideration, especially given the way we draw the gauges.

We intend, at least for the first few releases, to use our skins model as a basis for the gauges. In other words, we will supply a whole set of pre-defined images for the gauges and will release new images as and when our graphics designer produces new ones.

How are those images produced? For me, this is possibly the most interesting part of the whole design. The team has specified that they should be vector images, not raster, so that gauges can be expanded or shrunk without awful pixellation effects. They also decided early on to use XAML as the image definition language rather than rolling our own.

Whoa, won't that mean WPF has to be installed? Believe it or not, no, WPF is not required. The reason is that they've written a light-weight XAML parser and image renderer as part of the product. These design decisions have several benefits:

  • The XAML language is great for producing scalable vector images and is well documented
  • Our graphics designer can use Microsoft Blend to produce high-quality gauge images; we don't have to create a special one-off image editor (like we did with our skins)
  • We can release gauge images whenever we have them, we don't have to wait for a DXperience release
  • Using the hand-written XAML parser and renderer we can produce great images for both WinForms and ASP.NET
  • When we are ready with our WPF and Silverlight versions, we don't have to do anything to migrate our images: we merely "turn off" our renderer and use the .NET Framework instead.

It must be emphasized though that we haven't written a feature-complete XAML parser and renderer. That would be way too much work. Indeed, I would argue why replicate what Microsoft have already done? So there are some limitations: for example, no animations within the images and we only support certain simple XAML elements like Canvas, Rectangle, Ellipse, and so on. But that's certainly enough to get some stunning gauge images, and future-proof them into the bargain.

(A quick warning: we are not going to be documenting the XAML renderer so please don't ask. It is an internal class and is not intended for generalized use as a component. We've written and tuned it for one purpose and one purpose only: rendering gauges, and that's it.)

We're still fine-tuning the API to the library, but in essence the way it'll work is that the developer writes code to select a gauge and needle image from the pre-defined set, defines the scale, and then notifies the gauge through some event handling mechanism that the reading on the gauge should change.

However, this process is still in a state of flux and may change since we're more striving for ease of use and not necessarily ultimate flexibility. Our goals for the product are not to replicate the major gauge libraries out there, or even to produce the most flexible gauges, but instead to cover the most common scenarios for using them and to do it well, in our inimitable DevExpress style.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.