<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <Design.PreviewWith>
    <Border Padding="20">
      <StackPanel Spacing="20">
        <RepeatButton Content="Click Me!" />
      </StackPanel>
    </Border>
  </Design.PreviewWith>
  <Styles.Resources>
    <Thickness x:Key="ButtonPadding">8,5,8,6</Thickness>
  </Styles.Resources>
  <Style Selector="RepeatButton">
    <Setter Property="Background" Value="{DynamicResource RepeatButtonBackground}" />
    <!--<Setter Property="BackgroundSizing" Value="OuterBorderEdge" />-->
    <Setter Property="Foreground" Value="{DynamicResource RepeatButtonForeground}" />
    <Setter Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrush}" />
    <Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThemeThickness}" />
    <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
    <Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="VerticalAlignment" Value="Center" />    
    <Setter Property="FontWeight" Value="Normal" />
    <Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
    <!--<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
    <Setter Property="FocusVisualMargin" Value="-3" />-->
    <Setter Property="Template">
      <ControlTemplate>
        <ContentPresenter x:Name="PART_ContentPresenter"
                          Background="{TemplateBinding Background}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          CornerRadius="{TemplateBinding CornerRadius}"
                          Content="{TemplateBinding Content}"
                          ContentTemplate="{TemplateBinding ContentTemplate}"
                          Padding="{TemplateBinding Padding}"
                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
      </ControlTemplate>
    </Setter>
  </Style>

  <Style Selector="RepeatButton /template/ ContentPresenter#PART_ContentPresenter">
    <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
  </Style>

  <Style Selector="RepeatButton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
    <Setter Property="Background" Value="{DynamicResource RepeatButtonBackgroundPointerOver}" />
    <Setter Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrushPointerOver}" />
    <Setter Property="Foreground" Value="{DynamicResource RepeatButtonForegroundPointerOver}" />
  </Style>

  <Style Selector="RepeatButton:pressed  /template/ ContentPresenter#PART_ContentPresenter">
    <Setter Property="Background" Value="{DynamicResource RepeatButtonBackgroundPressed}" />
    <Setter Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrushPressed}" />
    <Setter Property="Foreground" Value="{DynamicResource RepeatButtonForegroundPressed}" />
  </Style>

  <Style Selector="RepeatButton:disabled /template/ ContentPresenter#PART_ContentPresenter">
    <Setter Property="Background" Value="{DynamicResource RepeatButtonBackgroundDisabled}" />
    <Setter Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrushDisabled}" />
    <Setter Property="Foreground" Value="{DynamicResource RepeatButtonForegroundDisabled}" />
  </Style>
</Styles>
