Dictionary.xaml 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <Style TargetType="Button"
  4. x:Key="BtnStyle">
  5. <Setter Property="Foreground"
  6. Value="White" />
  7. <Setter Property="Template">
  8. <Setter.Value>
  9. <ControlTemplate TargetType="Button">
  10. <Border BorderBrush="{TemplateBinding Control.BorderBrush}"
  11. BorderThickness="1"
  12. CornerRadius="10"
  13. Name="root">
  14. <Border.Background>#6A5ACD</Border.Background>
  15. <ContentPresenter Content="{TemplateBinding ContentControl.Content}"
  16. HorizontalAlignment="Center"
  17. VerticalAlignment="Center" />
  18. </Border>
  19. <ControlTemplate.Triggers>
  20. <Trigger Property="IsMouseOver"
  21. Value="True">
  22. <Setter TargetName="root"
  23. Property="Background"
  24. Value="#AB82FF" />
  25. </Trigger>
  26. </ControlTemplate.Triggers>
  27. </ControlTemplate>
  28. </Setter.Value>
  29. </Setter>
  30. </Style>
  31. </ResourceDictionary>