WPF Reflections

Mar 9 2008   6:53AM GMT

Multi value converter in databinding

Mark Shurmer Profile: MarkWPF

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.


Converter class

Then you specify a multi binding in your xaml, like:


 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: