<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <BooleanToVisibilityConverter x:Key="bool2VisibilityConverter" />
    <Style x:Key="MyWindowStyle" TargetType="Window">
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Window">
                    <Grid>
                        <AdornerDecorator>
                            <Grid x:Name="LayoutRoot">
                                <ContentPresenter />
                            </Grid>
                        </AdornerDecorator>
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Opacity=".9"
                            Visibility="{Binding IsActive, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Converter={StaticResource bool2VisibilityConverter}}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="WindowChrome.WindowChrome">
            <Setter.Value>
                <WindowChrome
                    CaptionHeight="0"
                    CornerRadius="0"
                    GlassFrameThickness="1"
                    ResizeBorderThickness="9"
                    UseAeroCaptionButtons="False" />
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>