<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    x:ClassModifier="internal">
    <ControlTheme x:Key="{x:Type Window}"
                  TargetType="Window">
        <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
        <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}" />
        <Setter Property="Foreground" Value="{DynamicResource ThemeForegroundBrush}" />
        <Setter Property="FontSize" Value="{DynamicResource FontSizeNormal}" />
        <Setter Property="WindowStartupLocation" Value="CenterScreen" />
        <Setter Property="ExtendClientAreaChromeHints" Value="NoChrome" />
        <Setter Property="ExtendClientAreaToDecorationsHint" Value="True" />
        <Setter Property="ExtendClientAreaTitleBarHeightHint" Value="36" />
        <Setter Property="Template">
            <ControlTemplate>
                <Panel>
                    <Border Name="PART_TransparencyFallback"
                            IsHitTestVisible="False" />
                    <Border Background="{TemplateBinding Background}"
                            IsHitTestVisible="False" />
                    <Panel Margin="{TemplateBinding WindowDecorationMargin}"
                           Background="Transparent" />
                    <VisualLayerManager>
                        <VisualLayerManager.ChromeOverlayLayer>
                            <TitleBar />
                        </VisualLayerManager.ChromeOverlayLayer>
                        <ContentPresenter Name="PART_ContentPresenter"
                                          Margin="{TemplateBinding Padding}"
                                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Content="{TemplateBinding Content}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
                    </VisualLayerManager>
                </Panel>
            </ControlTemplate>
        </Setter>
        <Style Selector="^Window[WindowState=Maximized] /template/ ContentPresenter#PART_ContentPresenter">
            <Setter Property="Padding" Value="8"/>
        </Style>
    </ControlTheme>
</ResourceDictionary>