Save and Load Templates
Custom controls help programmers save time (and their employers save money) by providing reusable bits of UI and functionality. However, with controls that are extensively customizable, like Dundas Gauge for .NET, a programmer could still spend a considerable amount of time customising an existing template to suit the exact requirements of the application. To save the time and effort spent in redoing this, Dundas Gauge for .NET provides the programmer with a facility to save and load templates. Templates are essentially XML files which hold information about the various properties of the gauge, which can be read by the Gauge container to recreate the control exactly as it was originally created.
Figure 7 - Save Template Wizard
You can opt to save just the appearance or the complete gauge. The Appearance only option saves the type of the gauges in the container, and the pointers, frames, and any ranges of the gauges. The Complete option saves all the UI elements, including any custom images you may have added.
To replicate a gauge, all you have to do is drop a gauge container control on a form, and click the Load Template link on the property, select which file to load the template from, and indicate whether to load appearance only or the complete gauge from the template.
Figure 8 - Load Template Wizard
Using this feature, you can have a graphic designer create a library of controls with the exact look and feel that you want, which the developers can then pick up and use across multiple projects. The potential time savings accrued by the intelligent use of this feature alone could make buying this component a good investment.
As of now, the templates are saved at the Gauge container level, which means that when you save a template you are saving the layout and UI elements of all the gauges in that container. The same applies when loading a template. While this is great news when you want to save the layout of a gauge container having several gauges, saving the template of a particular gauge within a container having multiple gauges, or applying a template to a particular gauge in a container having multiple gauges, is not possible currently. Dundas is working on a feature that allows saving and loading templates at the gauge level, so I guess we can expect this feature in a future release, hopefully as part of a minor version.