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

    <Style TargetType="GroupBox" x:Key="GroupBoxStyle1" >
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="GroupBox">
                    <Grid>
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{TemplateBinding Background}"
                                    CornerRadius="5">
                            <ContentPresenter Margin="10,20,10,10"/>
                        </Border>
                        <ContentPresenter Content="{TemplateBinding Header}"
                                              Margin="10,0,0,0"
                                              VerticalAlignment="Top"
                                              HorizontalAlignment="Left"
                                              ContentTemplate="{TemplateBinding HeaderTemplate}"
                                              ContentStringFormat="{TemplateBinding HeaderStringFormat}">
                            <ContentPresenter.RenderTransform>
                                <TranslateTransform Y="-8"/>
                            </ContentPresenter.RenderTransform>
                            <!--<ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="Background" Value="White"/>
                                    <Setter Property="Padding" Value="0"/>
                                </Style>
                            </ContentPresenter.Resources>-->
                        </ContentPresenter>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>