-1
我尝试了很多不同的选项来更改悬停时的背景颜色,但它对我没有任何作用。WPF - 更改按钮悬停上的backgroundcolor
这里是我的代码:
<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>
向我们展示你尝试过什么。有很多教程,甚至还有关于如何做到这一点的一步一步的视频。 –
我会考虑使用一种风格。 – ProgrammingDude
是的,绝对在样式中做这个,定义MouseOver触发器。 – HoboCannibaL