The need for a design-time gallery arose when we were creating the examples in our QSF application. It turned out that creating a full gauge design was more tedious than it looked at first. The gauges have a lot of functionality to tweak and this directly translates to a lot of XAML. After the first two or three implemented designs we thought "Oh my, we have to do something about writing all this XAML by hand, we don't want to bore our users to death.", then we did a little research to determine what would be the best option (no, manual copy paste is not an option, it is lame, it is much better to have a program which will copy/paste for you :)).
As the title of this post suggests, we stopped on the gallery idea since it seemed the most flexible. The gauge classes have a lot of properties to tweak so it doesn't make any sense to encapsulate all of this in one uber gauge object with 10^15 properties. We decided to present, during design-time, a gallery of pre-defined gauge designs which developers can click on and have all the XAML generated automatically. With this feature in hand users can tweak the generated XAML, encapsulate it in a ControlTemplate or a UserControl and expose only the few properties that they need, or simply use it as it is.
In order to use the gallery all you need to do is to place a RadGauge object in your favourite layout panel, select it and click the gauge icon that appears at the top right corner of the RadGauge object.
Now you can simply select a gauge that looks closest to your requirements by clicking on it and a fairy will probably appear and generate the XAML. If she doesn't appear do not worry, she is still there somewhere. The XAML can not appear out of thin air you know. :)
As usual, for feedback and/or questions please post on our forums, we are always happy to hear from our users.
Subscribe to be the first to get our expert-written articles and tutorials for developers!