Csharp_Snippets/WpfApp1/Styles/Button_Hover_Style.xaml

22 lines
1000 B
Plaintext
Raw Normal View History

2022-04-01 20:19:42 +02:00
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style BasedOn="{StaticResource {x:Type Button}}"
TargetType="{x:Type Button}"
x:Key="Button_Hover">
<Setter Property="Background" Value="#FF2F08A0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF0C0227"/>
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>