0

When creating WPF user controls I often find myself creating small converter classes when binding values.

Often you need to do similar conversions, and it made me wonder whether I might be missing some existing available implementations.

  • Does the .NET library contain any implementations of IValueConverter or IMultiValueConverter?
  • Has there been any attempt made to create a library of reusable value converters?
Steven Jeuris
  • 18,274
  • 9
  • 70
  • 161

1 Answers1

2

There are not many built-in, public are:

May have missed some...

H.B.
  • 166,899
  • 29
  • 327
  • 400
  • Thanks, might I ask how you know this? – Steven Jeuris Mar 05 '12 at 00:46
  • @StevenJeuris: The one i mentioned is the only one that ever sees much use though... – H.B. Mar 05 '12 at 00:50
  • Okay thanks, I just wanted to make sure I wasn't missing a ****load of classes I could have been using. You answered my questions sufficiently. When I have spare time it might be fun to write code which queries the entire library for classes which implement any of those interfaces. :) – Steven Jeuris Mar 05 '12 at 00:52
  • 1
    @StevenJeuris: There are already applications which do that, e.g. [ILSpy](http://wiki.sharpdevelop.net/ilspy.ashx) which is mainly a decompiler also shows derived types. I just used that to check for the public converters in the .NET assemblies, as mentioned in the answer i may have missed some. – H.B. Mar 05 '12 at 00:56
  • 1
    @StevenJeuris: The Microsoft.Expression.Framework assembly contains a lot of converters, don't know if that is included in the [Blend SDK](http://www.microsoft.com/download/en/details.aspx?id=10801) though, if so it might be worth a look. – H.B. Mar 05 '12 at 01:00