【发布时间】:2016-02-23 20:46:02
【问题描述】:
我尝试了许多不同的选项来更改悬停时的背景颜色,但它对我不起作用。
这是我的代码:
<Button x:Name="bAction" HorizontalAlignment="Center" Margin="0,500,0,0" VerticalAlignment="Center" Height="100" Width="1000" BorderBrush="Black" OpacityMask="White" Background="#FF5B5B5B" IsDefault="True" Click="bAction_Click">
<TextBlock x:Name="tbAction" TextWrapping="Wrap" Text="Test" Foreground="White" IsEnabled="False" Width="990" Height="85" FontFamily="Letter Gothic Std" FontSize="21.333" FontWeight="Bold" TextDecorations="{x:Null}" TextAlignment="Center"/>
</Button>
【问题讨论】:
-
向我们展示您的尝试。有大量的教程,甚至是关于如何做到这一点的分步视频。
-
我会考虑使用样式。
-
是的,一定要在样式中这样做,定义 MouseOver 触发器。