鼠标结束时更改按钮的颜色
我想更改按钮的背景色 IsMouseOver == True <Button Command="{Binding ClickRectangleColorCommand}" Background="{Binding Color, Converter={StaticResource RGBCtoBrushColorsConverter},Mode=TwoWay}" Width="auto" Height="40"> <TextBlock Foreground="Black" Text="{Binding Color, Converter={StaticResource RGBCColorToTextConveter},Mode=TwoWay}"/> <Button.Style> <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="DarkGoldenrod"/> </Trigger> </Style.Triggers> </Style> </Button.Style> </Button> I can't seem to understand why this trigger isn't working.