Is there a way to chain multiple value converters in XAML?

Posted by Mal Ross on Stack Overflow See other posts from Stack Overflow or by Mal Ross
Published on 2010-04-09T12:50:54Z Indexed on 2010/04/09 12:53 UTC
Read the original article Hit count: 397

Filed under:
|

I've got a situation in which I need to show an integer value, bound to a property on my data context, after putting it through two separate conversions:

  1. Reverse the value within a range (e.g. range is 1 to 100; value in datacontext is 90; user sees value of 10)
  2. convert the number to a string

I realise I could do both steps by creating my own converter (that implements IValueConverter). However, I've already got a separate value converter that does just the first step, and the second step is covered by Int32Converter.

Is there a way I can chain these two existing classes in XAML without having to create a further class that aggregates them?

If I need to clarify any of this, please let me know. :)

Thanks.

© Stack Overflow or respective owner

Related posts about ivalueconverter

Related posts about xaml