0
我想添加一個懸停效果到我創建的邊框,如下所示。WinRT - 邊框懸停改變不透明度
<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>
它永遠不能工作。 請告知我錯誤地做了哪部分。 謝謝