AuthorizationUserControlStyles.xaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <SolidColorBrush x:Key="MainColor" Color="White"/>
  4. <SolidColorBrush x:Key="AdditionalColor" Color="#76e383"/>
  5. <SolidColorBrush x:Key="AccentColor" Color="#498c51"/>
  6. <Style x:Key="AuthorizationUserControl.LoginButton" TargetType="{x:Type Button}">
  7. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  8. <Setter Property="Background" Value="{StaticResource AccentColor}"/>
  9. <Setter Property="Foreground" Value="White"/>
  10. <Setter Property="BorderThickness" Value="0"/>
  11. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  12. <Setter Property="VerticalContentAlignment" Value="Center"/>
  13. <Setter Property="Padding" Value="1"/>
  14. <Setter Property="Template">
  15. <Setter.Value>
  16. <ControlTemplate TargetType="{x:Type Button}">
  17. <Border x:Name="border"
  18. Background="{TemplateBinding Background}"
  19. BorderBrush="{TemplateBinding BorderBrush}"
  20. BorderThickness="{TemplateBinding BorderThickness}"
  21. SnapsToDevicePixels="true"
  22. CornerRadius="5">
  23. <ContentPresenter x:Name="contentPresenter"
  24. Focusable="False"
  25. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  26. Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"
  27. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  28. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  29. </Border>
  30. <ControlTemplate.Triggers>
  31. <Trigger Property="IsMouseOver" Value="True">
  32. <Setter TargetName="border" Property="Background" Value="#185B20"/>
  33. </Trigger>
  34. <Trigger Property="IsPressed" Value="True">
  35. <Setter TargetName="border" Property="Background" Value="#436948"/>
  36. </Trigger>
  37. </ControlTemplate.Triggers>
  38. </ControlTemplate>
  39. </Setter.Value>
  40. </Setter>
  41. </Style>
  42. </ResourceDictionary>