我想为我创建的边框添加悬停效果,如下所示。
<Border x:Name="borderHeader" Background="#000000" Height="100" VerticalAlignment="top" Opacity="0.5" HorizontalAlignment="Left" Width="1366">
我的视觉状态代码如下。
<VisualStateManager.VisualStateGroups>
<VisualState x:Name="PointerOver">
<Storyboard>
<DoubleAnimation Duration="0" To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="borderHeader"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
怎么也行不通。请指出我做错了哪一部分。谢谢