<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:widget="clr-namespace:BallanceTasEditor.Frontend.Widgets">
    <Style x:Key="IconGroupBoxStyle" TargetType="{x:Type widget:IconGroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="{Binding GroupBoxIcon, RelativeSource={RelativeSource AncestorType=widget:IconGroupBox}, Mode=OneWay}"
                               RenderOptions.BitmapScalingMode="HighQuality"
                               Width="16" Height="16" VerticalAlignment="Center"/>
                        <TextBlock Text="{Binding GroupBoxText, RelativeSource={RelativeSource AncestorType=widget:IconGroupBox}, Mode=OneWay}" 
                                   Margin="5,0,0,0" VerticalAlignment="Center"/>
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type widget:IconGroupBox}" BasedOn="{StaticResource IconGroupBoxStyle}"/>

</ResourceDictionary>