I have a WPF UserControl with binding converters referenced like this:
<UserControl x:Class="MyControl" x:Name="MyControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TheMainNamespaceOfThisAssembly">
<UserControl.Resources>
<local:ConfidenceColorConverter x:Key="ConfidenceColorConverter"/>
</UserControl.Resources>
I then use the binding converter later. I see the user control in my design window. Then I compile, then place this user control in my main window. I run it and it works. However, I still would like to use the designer on the main window, which breaks with:
Could not create an instance of type 'MyControl'.
So I learned how to debug the designer; when I do, I get an XamlParseException:
Cannot find type 'TheMainNamespaceOfThisAssembly.ConfidenceColorConverter'. The assembly used when compiling might be different than that used when loading and the type is missing. Error in markup file...
If remove the references to the converters, my user control displays well in the designer on the main window. Any ideas how to fix my references to the converters so that they won't break the designer?
Couldn't understand if the article Troubleshooting WPF Designer Load Failures applies or not.