Nov 19, 2008

Customize Silverlight Toolkit Controls: NumericUpDown

Introduction

The beauty of WPF/Silverlight control architecture is the separation of behavior from presentation, in another word, the capability to style/template a control so that it may look very different but still behave the same, more or less, all without a single line of code. There is no way a control's default UI can satisfy all possible user needs, so this capability is extremely useful, and there have been asks in the forum and from search queries to my blog for various customization of the default control templates in Silverlight Toolkit. It is actually fairly easy to re-templating/style a control with tools like Expression Blend. For your convenience, I will write a series of posts to demonstrate the most asked customizations, and provide the xaml that you can copy and paste for your own use. I will start with NumericUpDown.

NumericUpDown Customization

Below screen shot shows common customizations for NumericUpDown control. If you have Silverlight 2.0 RTM installed, you can also play with it here.

NumericUpDown Customization

Source Code

You can download the zipped project below to play with. I will add those customized templates to Silverlight Toolkit sample project in next release.  

Conclusion

Hope this is helpful! As always, feedback is welcome. Thanks!