<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="ProgressWindowStyle" TargetType="WindowBase">
        <Setter Property="Background" Value="GhostWhite" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type WindowBase}">
                    <Border Background="{TemplateBinding Background}">
                        <AdornerDecorator>
                            <ContentPresenter />
                        </AdornerDecorator>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MessageBoxWindowStyle" TargetType="WindowBase">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="AllowsTransparency" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type WindowBase}">
                    <Border Background="{TemplateBinding Background}">
                        <AdornerDecorator>
                            <ContentPresenter />
                        </AdornerDecorator>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MainWindowStyle" TargetType="WindowBase">
        <Setter Property="Background" Value="GhostWhite" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="WindowChrome.WindowChrome">
            <Setter.Value>
                <WindowChrome CaptionHeight="0" CornerRadius="0" ResizeBorderThickness="0"
                              NonClientFrameEdges ="None" UseAeroCaptionButtons="False" GlassFrameThickness="0"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type WindowBase}">
                    <AdornerDecorator>
                        <Grid Background="{TemplateBinding Background}">
                            <ContentPresenter />
                            <Border Background="{DynamicResource OverlayBrush}"
                                    x:Name="BorderDim" Visibility="Collapsed" />
                        </Grid>
                    </AdornerDecorator>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding IsActive, RelativeSource={RelativeSource Self}}" Value="False" />
                                <Condition Binding="{Binding IsActive, Source={x:Static PlayniteApplication.Current}}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <Setter Property="Visibility" Value="Visible" TargetName="BorderDim"/>
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>