tags:

views:

949

answers:

2

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.

+12  A: 

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
Thanks, it helped me out! WPF sometimes has the strangest errors!
NickAldwin
A: 

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