C# WPF Style: One Button Mouseover - One Button keep Image
I have 2 buttons and one should change the background color on mouseover.
The otherone should keep his background Image also when mouseover.
My Problem is that the second one also gets the mouseover effect and the
image is overwrited :(
<Window.Resources>
<Style x:Key="hover" TargetType="Button">
<Setter Property="Background" Value="#FF2598CE" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF24779D" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
1.Button
<Button Content="0" Name="num0" Foreground="White" Background="#FF2598CE"
BorderBrush="#FF24779D" Style="{StaticResource hover}" />
2.Button
<Button Content="" Name="up" BorderBrush="#FF24779D">
<Button.Background>
<ImageBrush ImageSource="/Rechner;component/Images/btn_up.jpg" />
</Button.Background>
</Button>
thx for your help
No comments:
Post a Comment