12

I have just run into this exception on an IValueConverter I am implementing:

IValueConverter type does not have a public TypeConverter class

Has anyone else come across this? What's the cause, and how do I fix? Thanks.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
David Veeneman
  • 18,912
  • 32
  • 122
  • 187

2 Answers2

45

Simple solution, as it turns out. I had referenced my value converter like this:

<Binding Path="Foreground" Converter="StaticResource BrushToRgbConverter" ConverterParameter="B" />

instead of this:

<Binding Path="Foreground" Converter="{StaticResource BrushToRgbConverter}" ConverterParameter="B" />

In other words, I had omitted the braces from my Converter reference.

David Veeneman
  • 18,912
  • 32
  • 122
  • 187
0

Here is an article I wrote about the same problem, but with a different cause. In my case, I had referenced the wrong Brush class in the wrong namespace.

Joel Cochran
  • 7,139
  • 2
  • 30
  • 43