<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <ControlTheme x:Key="{x:Type ToggleButton}"
                TargetType="ToggleButton">
    <Setter Property="Background" Value="{DynamicResource ThemeControlMidBrush}" />
    <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}" />
    <Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}" />
    <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
    <Setter Property="Cursor" Value="Hand"/>
    <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
    <Setter Property="Padding" Value="5"/>
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="Template">
      <ControlTemplate>
        <ContentPresenter Name="PART_ContentPresenter"
                          Padding="{TemplateBinding Padding}"
                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                          Background="{TemplateBinding Background}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          Content="{TemplateBinding Content}"
                          ContentTemplate="{TemplateBinding ContentTemplate}"
                          CornerRadius="{TemplateBinding CornerRadius}"
                          RecognizesAccessKey="True"
                          TextElement.Foreground="{TemplateBinding Foreground}" />
      </ControlTemplate>
    </Setter>
    <Style Selector="^:checked">
      <Setter Property="Background" Value="{DynamicResource ThemeControlHighBrush}" />
      <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}" />
    </Style>
    <Style Selector="^:pointerover">
      <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}" />
    </Style>
    <Style Selector="^:pressed">
      <Setter Property="Background" Value="{DynamicResource ThemeControlHighBrush}" />
    </Style>
    <Style Selector="^:disabled">
      <Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}" />
    </Style>
  </ControlTheme>
</ResourceDictionary>