I have changed the template for ListBoxItem. In that template I have the following triggers...
<!-- IsSelected -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
<!-- IsMouseOver -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="UIElement.IsMouseOver" Value="True"/>
<Condition Property="IsSelected" Value="False"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
These work fine. When the mouse goes over an item the animation occurs, when I select an item another one occurs. However, when I add the following trigger beneat them not only does it not work but it also stops the two existing ones from working too!
<!-- Normal -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="UIElement.IsMouseOver" Value="False"/>
<Condition Property="IsSelected" Value="False"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
Can anyone tell me why this is?
<!-- IsSelected -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="True"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
...
</Storyboard></BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
<!-- IsMouseOver -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="UIElement.IsMouseOver" Value="True"/>
<Condition Property="IsSelected" Value="False"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
...
</Storyboard></BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
These work fine. When the mouse goes over an item the animation occurs, when I select an item another one occurs. However, when I add the following trigger beneat them not only does it not work but it also stops the two existing ones from working too!
<!-- Normal -->
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="UIElement.IsMouseOver" Value="False"/>
<Condition Property="IsSelected" Value="False"/>
</MultiTrigger.Conditions>
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
...
</Storyboard></BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
Can anyone tell me why this is?