<UserControl x:ClassModifier="internal"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:PixiEditor.Views.UserControls" xmlns:colorpicker="clr-namespace:ColorPicker;assembly=ColorPicker"
             xmlns:PixiEditor="clr-namespace:PixiEditor"
             xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
             xmlns:views="clr-namespace:PixiEditor.Views"
             x:Class="PixiEditor.Views.UserControls.ToolSettingColorPicker"
             mc:Ignorable="d" 
             x:Name="uc"
             d:Background="{StaticResource AccentColor}">
    <colorpicker:PortableColorPicker Width="40" Height="20" x:Name="ColorPicker" UseHintColor="True"
                                     HintColor="{Binding DataContext.ColorsSubViewModel.PrimaryColor, 
        RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type views:MainWindow}, AncestorLevel=1},
        Converter={converters:GenericColorToMediaColorConverter}}"
                                     SelectedColor="{Binding SelectedColor, ElementName=uc, Mode=TwoWay}"/>
</UserControl>
