Generic custom WPF/Silverlight value converters
Data binding is one of the most powerful features of WPF/Silverlight. It allows developers to achieve more with less code. However, when building user interfaces with WPF/Silverlight, you often need to code a little bit in the form of custom value converters. Value converters fill the gap between the way data is stored in your classes and the way that this data will be displayed in your WPF window or Silverlight page. A common mistake made by people who are new to WPF/Silverlight is to implement custom value converters for each and every binding that requires one.
Of course value converters can be generalized an re-used. While developing with WPF for several months now, I have been implementing a library of generic custom value converters. Today I have posted a new article which contains the source code of my library of generic custom value converters and it will demonstrate in which scenarios you can use them.
Here is the table of contents of the article which is posted on my website:
- How to implement a WPF/Silverlight value converter ?
- How to use WPF/Silverlight value converters ?
- Generic WPF/Silverlight value converters
- Piping value converters