Mar 9 2008 6:53AM GMT
Posted by: Mark Shurmer
XAML, C, Databinding, WPF
Multi value converter in databinding
Posted by: Mark Shurmer
Here’s a nifty little trick that I recently discovered.
When you need to calculate the result of two properties and display it, you can do it via a Converter class.
You may want to do it, like me, if you couldn’t update the business objects, or didn’t want to.
How do you do it?
Your converter class needs to implement IMultiValueConverter instead of IValueConverter.
E.g.:
Then you specify a multi binding in your xaml, like:



You must be logged-in to post a comment. Log-in/Register