In my WPF control, I have below code. If I don't have a trigger with false, I can see the my storyboard, but if I have both ture and false trigger开发者_如何学Gos, I don't see any thing.
How to fix this? Appreciate your help!
<Trigger Property="Control.IsMouseOver" Value="True">
<StoryBoard>
Image with Opacity 1
</StoryBoard>
</Trigger>
<Trigger Property="Control.IsMouseOver" Value="False">
<StoryBoard>
Image with Opacity 0
</StoryBoard>
</Trigger>
False trigger is unnecessary. Use default control state to represent situation when Control.IsMouseOver is False. WPF automatically reverts changes made by trigger when its condition is false.
精彩评论