DataTrigger.EnterActions
-
22. prosince 2005 8:51
I'm having problems getting DataTriggers.EnterActions to work. Given the following snipet:
<
DataTemplate.Triggers><Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="itemBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="itemBackground" Storyboard.TargetProperty="Opacity"
To="0" Duration="0:0:0.2" /></
Storyboard></
BeginStoryboard></
Trigger.ExitActions></
Trigger><
DataTrigger Binding="{Binding ShowAlert}" Value="True"><
DataTrigger.EnterActions><
BeginStoryboard><
Storyboard ><
DoubleAnimation Storyboard.TargetName="itemBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:5" /></
Storyboard></
BeginStoryboard></
DataTrigger.EnterActions><
DataTrigger.ExitActions><
BeginStoryboard><
Storyboard><
DoubleAnimation Storyboard.TargetName="itemBackground" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:1" /></
Storyboard></
BeginStoryboard></
DataTrigger.ExitActions></
DataTrigger></
DataTemplate.Triggers></
DataTemplate>The Trigger.EnterActions fires and works fine. However the DataTrigger.EnterActions, which performs the same animation does not fire. I placed a breakpoint on the property that the DataTrigger.EnterActions is bound to, and the property is being accessed. Anyone have experience with DataTrigger.EnterActions? Thanks.