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.
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!








Can I use this control in a commercial application without repercussions?
Like being sued or require to publish source?
Thanks.. Can’t seem to find your licensing scheme..
thanks! Great work btw.
Hi Martin,
Sorry for the source code truncation: it seems the “Insert Source Code” plugin I used has a limit on how much code it can take. Thanks for pointing this out. I’ve fixed it in the post; and per your request, attached the project zip file as well.
Thanks,
-Ning
Hi Ning Zhang,
Your source code appears to be truncated.
Any way to fix it (or add a ZIP file)?
Thanks,
Martin