<UserControl x:Class="ColorMixer_Sample.ColorMixer"
             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:ColorMixer_Sample"
             mc:Ignorable="d" 
            d:DesignHeight="100" d:DesignWidth="200"
            Name="colorMixer">
    <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=colorMixer,Path=Padding}"
                Value="{Binding ElementName=colorMixer,Path=Red}" />

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

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

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