<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:PixiEditor.Views.UserControls">

    <Style TargetType="{x:Type local:ListSwitchButton}" BasedOn="{StaticResource ResourceKey={x:Type Button}}" x:Name="btn">
        <Setter Property="BorderBrush" Value="Black"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontSize" Value="12"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Padding" Value="2, 0"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ListSwitchButton}">
                    <Border
                            CornerRadius="1"
                        BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{Binding Path=ActiveItem.Background, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:ListSwitchButton}}}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Path=ActiveItem.Content, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:ListSwitchButton}}}"
                                   FontSize="{TemplateBinding FontSize}" Padding="{TemplateBinding Padding}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>