How to set the ValueConversion attribut for a IMultiValueConverter
Asked Answered
J

2

20

I changed my converter from IValueConverter to IMultiValueConverter : Previously I converted int to string :

[ValueConversion(typeof(int), typeof(string))]

But now I convert an int and a double to a string.

How should I specify my ValueConversion attribut now ? I have two input and one output now.

Jabberwocky answered 3/12, 2010 at 10:22 Comment(0)
A
11

I dont think you can use ValueConversionAttribute with an implementation of IMultiValueConverter

I think ValueConversionAttribute is primarily used for design-time support and MultiBindings dont seem to make much sense in this context

Arianism answered 3/12, 2010 at 11:37 Comment(0)
B
6

I've never seen ValueConversionAttribute applied to IMultiValueConverter implementing class. And there is no appropriate attribute for this kind of converter in System.Windows.Data namespace. You can safely omit the attribute at all.

Birgitbirgitta answered 3/12, 2010 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.