Home > Design Time, Silverlight > Customize Silverlight Toolkit Controls: NumericUpDown

Customize Silverlight Toolkit Controls: NumericUpDown

November 19th, 2008 Leave a comment Go to comments

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!

  1. sevalle_xx
    May 18th, 2011 at 02:02 | #1

    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. :)

  2. Ning Zhang
    November 20th, 2008 at 20:58 | #2

    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

  3. Anonymous
    November 20th, 2008 at 16:35 | #3

    Hi Ning Zhang,

    Your source code appears to be truncated.

    Any way to fix it (or add a ZIP file)?

    Thanks,
    Martin

  1. No trackbacks yet.