As you may know, Silverlight 3 doesn’t support IMultiValueConverter and… I badly need it. A Web Service proxy which defines a class structure that I need to display in my UI. The object definition class has a few array property such as string[], int[], etc. When I bind these property to a TextBlock, the Text property of the TextBlock becomes System.String[] or System.Int[]. Instead, I would like to see a list strings or numbers separated by a comma.
I thought about using a IMultiValueConverter but Silverlight 3 doesn’t support it. How do I work around this?
Thanks
The purpose of
IMultiValueConverteris to implement converters that support multiple bindings (i.e.MultiBindingobjects). In your case, this doesn’t actually seem to be what you need.If you want to convert an array (
string[]for example) into a text value, then simply define a normalIValueConverterthat does that. Don’t let the fact that an array contains multiple values confuse you.Here’s an example converter:
Hope that helps.