<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:BallanceTasEditor.Frontend.Styles">
    <DataTemplate x:Key="AccessoryIconDataTemplate">
        <StackPanel Orientation="Horizontal">
            <Image Source="{Binding Path=(local:AccessoryIcon.Icon), RelativeSource={RelativeSource AncestorType=Control, AncestorLevel=1}}"
                   Width="16" Height="16" RenderOptions.BitmapScalingMode="HighQuality"/>
            <ContentControl Content="{Binding}" Margin="5,0,0,0" VerticalAlignment="Center"/>
        </StackPanel>
    </DataTemplate>
    
    <Style x:Key="AccessoryIconButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="ContentTemplate" Value="{StaticResource AccessoryIconDataTemplate}"/>
    </Style>

    <Style x:Key="AccessoryIconGroupBox" TargetType="GroupBox" BasedOn="{StaticResource {x:Type GroupBox}}">
        <Setter Property="HeaderTemplate" Value="{StaticResource AccessoryIconDataTemplate}"/>
    </Style>
</ResourceDictionary>