Silverlight IValueConverter vs. TypeConverter
Posted by: Bryant Likess Blog,
on 24 Nov 2008 |
View original | Bookmarked: 0 time(s)
This is something that wasnt clear to me so I decided to blog about so that I could fully understand it. Both IValueConverters and TypeConverters are used to do conversions (imagine that!), but they are used differently. TypeConverters are used by the Xaml parser during parse time to convert values in the Xaml into values in CLR objects. So when you set Height=100, height isnt a string so it has to be converted to a double. This is done using a type converter. Type converters are also one-way since...