<UserControl x:Class="CustomControls.ColorPickerUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="colorPicker">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"></RowDefinition>
      <RowDefinition Height="Auto"></RowDefinition>
      <RowDefinition Height="Auto"></RowDefinition>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition></ColumnDefinition>
      <ColumnDefinition Width="Auto"></ColumnDefinition>
    </Grid.ColumnDefinitions>

    <Slider Name="sliderRed" Minimum="0" Maximum="255"
             Margin="{Binding ElementName=colorPicker,Path=Padding}"
             Value="{Binding ElementName=colorPicker,Path=Red}"></Slider>

    <Slider Grid.Row="1" Name="sliderGreen" Minimum="0" Maximum="255"
             Margin="{Binding ElementName=colorPicker,Path=Padding}"
                  Value="{Binding ElementName=colorPicker,Path=Green}"></Slider>

    <Slider Grid.Row="2" Name="sliderBlue" Minimum="0" Maximum="255"
             Margin="{Binding ElementName=colorPicker,Path=Padding}"
                  Value="{Binding ElementName=colorPicker,Path=Blue}"></Slider>

    
      <Rectangle Grid.Column="1" Grid.RowSpan="3"
                 Margin="{Binding ElementName=colorPicker,Path=Padding}"
                 Width="50" Stroke="Black" StrokeThickness="1">
        <Rectangle.Fill>
          <SolidColorBrush Color="{Binding ElementName=colorPicker,Path=Color}"></SolidColorBrush>
        </Rectangle.Fill>
      </Rectangle>
    
  </Grid>
</UserControl>
