I'm binding a collection of my W3CErrorOrWarning type objects to controls in a WPF Window.
One of its properties is named "Type". It is of type W3CErrorOrWarningType which is a simple Enum:
Enum W3CErrorOrWarningType ValidationError ValidationWarning End Enum
I'm trying to use it in this way...
<Window ...
xmlns:enums="clr-namespace:WpfApplication1.XhtmlTextBox.W3CValidator.W3CResponse.W3CErrorOrWarning"
... />
...
<DataTemplate>
<Image Name="TypeIcon" ... />
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Type}">
<DataTrigger.Value>
<enums:W3CErrorOrWarningType>
ValidationError
</enums:W3CErrorOrWarningType>
</DataTrigger.Value>
<Setter TargetName="TypeIcon"
Property="Source"
Value="images/Error.png"/>
</DataTrigger>
<DataTrigger Binding="{Binding Type}">
<DataTrigger.Value>
<enums:W3CErrorOrWarningType>
ValidationWarning
</enums:W3CErrorOrWarningType>
</DataTrigger.Value>
<Setter TargetName="TypeIcon"
Property="Source"
Value="images/Warning.png"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
I get this error:
Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'WpfApplication1.XhtmlTextBox.W3CValidator.W3CResponse.W3CErrorOrWarning' that is not included in the assembly.
My WpfApplication1 project contains a user control XhtmlTextBox. That user control contains a class called W3CValidator which contains a class called W3CResponse which contains a class called W3CErrorOrWarning which contains an enumeration called W3CErrorOrWarningType.
How do I enter the namespace for this type in my Window's XAML?