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

    <Style x:Key="DetailsViewGroupStyle" TargetType="{x:Type GroupItem}">
        <Setter Property="Foreground" Value="{DynamicResource TextBrushDarker}" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="FontSize" Value="15" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type GroupItem}">
                    <Expander BorderThickness="0" IsExpanded="True"
                              ExpanderBehaviors.SaveState="True"
                              ExpanderBehaviors.SaveStateId="{Binding Name, Mode=OneWay}">
                        <Expander.Header>
                            <DockPanel Background="Transparent">
                                <TextBlock DockPanel.Dock="Left"
                                           VerticalAlignment="Center" HorizontalAlignment="Left"
                                           TextAlignment="Center" Margin="0,0,5,0">
                                    <TextBlock.Style>
                                        <Style TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}">
                                            <Setter Property="Text" Value="{Binding Name, Converter={StaticResource ObjectToStringConverter}}" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Name, Converter={StaticResource ObjectToStringConverter}}" Value="{x:Null}">
                                                    <Setter Property="Text" Value="{DynamicResource LOCNone}" />
                                                </DataTrigger>
                                                <DataTrigger Binding="{Binding Name, Converter={StaticResource ObjectToStringConverter}}" Value="">
                                                    <Setter Property="Text" Value="{DynamicResource LOCNone}" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                </TextBlock>
                                <TextBlock Text="{Binding Items.Count, Mode=OneWay, StringFormat=({0})}"
                                           VerticalAlignment="Center" HorizontalAlignment="Left"
                                           Style="{DynamicResource BaseTextBlockStyle}"
                                           DockPanel.Dock="Left" TextAlignment="Center"
                                           Visibility="{Settings ShowGroupCount}"/>
                            </DockPanel>
                        </Expander.Header>
                        <ItemsPresenter />
                    </Expander>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>