DataTemplate triggers only on default enum property
-
I am having an issue in setting up a trigger to run off an enum property. It only seems to be triggering when the trigger is set to the default value. Do I need to add a ProperrtyChanged handler to do something? Class is derived from ItemsControl. This will trigger
Code
public static DependencyProperty DisplayTypeProperty =
DependencyProperty.Register("DisplayType",
typeof(UICardArrayDisplayType), typeof(UICardArray),
new PropertyMetadata(UICardArrayDisplayType.Community));XAML
<ui:UICardArray ItemsSource="{Binding Path=Cards}" DisplayType="HoleCards"/>DataTemplate
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="c:UICardArray.DisplayType" Value="Community"/>
<Condition Property="ItemsControl.AlternationIndex" Value="3"/>
</MultiTrigger.Conditions>
<Setter TargetName="CardDisplay" Property="Margin" Value="5,0,0,0"/>
</MultiTrigger>This will not
Code
public static DependencyProperty DisplayTypeProperty =
DependencyProperty.Register("DisplayType",
typeof(UICardArrayDisplayType), typeof(UICardArray),
new PropertyMetadata(UICardArrayDisplayType.HoleCards));XAML
<ui:UICardArray ItemsSource="{Binding Path=Cards}" DisplayType="Community"/>DataTemplate
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="c:UICardArray.DisplayType" Value="Community"/>
<Condition Property="ItemsControl.AlternationIndex" Value="3"/>
</MultiTrigger.Conditions>
<Setter TargetName="CardDisplay" Property="Margin" Value="5,0,0,0"/>
</MultiTrigger>Any help is appreciated