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

    <Style TargetType="{x:Type SidebarItem}">
        <Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="Foreground" Value="#dbdbdb" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderThickness" Value="3,0,0,0" />
        <Setter Property="Width" Value="44" />
        <Setter Property="Height" Value="44" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type SidebarItem}">
                    <Grid>
                        <ProgressBar x:Name="PART_ProgressStatus"
                                     BorderThickness="0" Background="Transparent"
                                     HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                        <Border Background="{TemplateBinding Background}"
                                Padding="{Binding IconPadding}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                BorderBrush="{TemplateBinding BorderBrush}">
                            <Viewbox>
                                <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                            </Viewbox>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding Selected}" Value="True">
                <Setter Property="Foreground" Value="{DynamicResource GlyphBrush}" />
                <Setter Property="BorderBrush" Value="{DynamicResource GlyphBrush}" />
            </DataTrigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{DynamicResource HoverBrush}" />
                <Setter Property="BorderBrush" Value="{DynamicResource GlyphBrush}" />
            </Trigger>
            <DataTrigger Binding="{Settings SidebarPosition}" Value="Right">
                <Setter Property="BorderThickness" Value="0,0,3,0" />
            </DataTrigger>
            <DataTrigger Binding="{Settings SidebarPosition}" Value="Top">
                <Setter Property="BorderThickness" Value="0,3,0,0" />
            </DataTrigger>
            <DataTrigger Binding="{Settings SidebarPosition}" Value="Bottom">
                <Setter Property="BorderThickness" Value="0,0,0,3" />
            </DataTrigger>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="Content" Value="{x:Null}" />
                    <Condition Property="ContentTemplate" Value="{x:Null}" />
                </MultiTrigger.Conditions>
                <MultiTrigger.Setters>
                    <Setter Property="Background" Value="OrangeRed" />
                </MultiTrigger.Setters>
            </MultiTrigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>