<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:MahApps.Metro.Controls"
                    xmlns:converters="clr-namespace:MahApps.Metro.Converters">

    <Style x:Key="MahApps.Metro.Styles.ContentControlEx" TargetType="{x:Type controls:ContentControlEx}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:ContentControlEx}">
                    <Grid Background="Transparent">
                        <ContentPresenter x:Name="PART_ContentPresenter"
                                          Margin="{TemplateBinding Padding}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Content="{TemplateBinding Content}"
                                          ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                          RecognizesAccessKey="{TemplateBinding RecognizesAccessKey}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          UseLayoutRounding="{TemplateBinding UseLayoutRounding}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ContentCharacterCasing" Value="Normal">
                            <Setter TargetName="PART_ContentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content}" />
                        </Trigger>
                        <Trigger Property="ContentCharacterCasing" Value="Upper">
                            <Setter TargetName="PART_ContentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content, Converter={converters:ToUpperConverter}}" />
                        </Trigger>
                        <Trigger Property="ContentCharacterCasing" Value="Lower">
                            <Setter TargetName="PART_ContentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Content, Converter={converters:ToLowerConverter}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
    </Style>

    <Style x:Key="MahApps.Metro.Styles.MetroThumbContentControl"
           BasedOn="{StaticResource MahApps.Metro.Styles.ContentControlEx}"
           TargetType="{x:Type controls:MetroThumbContentControl}" />

</ResourceDictionary>