I am designing the GUI for my WPF app. I have a button that has a custom image as the background. When the mouse rolls over the button, I want the background to change to a solid color. In my current code, the Foreground property works as expected, but the background property does not change anything. When the mouse rolls over, the background changes to the default rollover background. Why won't this work?
Here is my app.xaml:
<Style x:Key="MainMenuButton" TargetType="Button">
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="assets/img/mainMenuButton.png" Stretch="UniformToFill"/>
</Setter.Value>
</Setter>
<Setter Property="FontFamily" Value="Franklin Gothic Book" />
<Setter Property="Padding" Value="8" />
<Setter Property="Margin" Value="0" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="322"/>
<Setter Property="Height" Value="73"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</Style.Triggers>
</Style>