Silverlight provides extremely powerful data binding engine. However, there some situation where the data needs to be additionally modified and value converters is the solution. Digg in value converters with Dan Wahlin’s article So What’s a Silverlight Value Converter Anyway?
When you’re binding data to controls there will be times when the data needs to be modified or tweaked some on the way into a control or as the data leaves a control and goes back to the source property (during a TwoWay binding for example). Sure, you can always write code to change a given value, but in many cases it’s much easier to write a simple value converter instead that can be re-used. In this post I’ll walk through creating a value converter and then show the code for a few of the value converters I find myself using fairly frequently.