David on Dec 5th, 2008Silverlight JavaScript Value Converter
Value converters allow you to modify the value of the source property of a binding before it is applied to the target. As shown in my previous WPF examples, you would normally write a new class implementing the IValueConverter interface which will do the conversion. For simple transforms such as performing basic arithmetic or formatting [...]
David on Aug 10th, 2008Pluralizing Value Converter
I often find myself wanting to pluralize text in my applications such as displaying either ‘1 Message’ or ‘2 Messages’. Anyone who has played with Rails will have likely came across the Infector which, among other things, is capable of taking a singular word and returning its plural – message => messages and mouse => [...]