<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Design.PreviewWith>
        <StackPanel Spacing="5">
            <Button Content="Button"/>
            <Button Content="Button" IsEnabled="False"/>
        </StackPanel>
    </Design.PreviewWith>

    <ControlTheme TargetType="Button" x:Key="DialogButtonTheme">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="CornerRadius" Value="0"/>
        <Setter Property="Width" Value="48"></Setter>
        <Setter Property="IsHitTestVisible" Value="True"/>
        <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Padding" Value="5"/>
        <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="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
            <Setter Property="Background" Value="{DynamicResource ThemeControlHighlightBrush}" />
        </Style>
        <Style Selector="^.close:pointerover /template/ ContentPresenter#PART_ContentPresenter">
            <Setter Property="Background" Value="Red" />
        </Style>
        <Style Selector="^:pressed  /template/ ContentPresenter#PART_ContentPresenter">
            <Setter Property="Background" Value="{DynamicResource ThemeControlHighBrush}" />
            <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundColor}" />
        </Style>
        <Style Selector="^:disabled">
            <Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}"/>
            <Setter Property="Cursor" Value="Arrow" />
        </Style>
    </ControlTheme>
</ResourceDictionary>
