<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="pdftron.PDF.Tools.ColorPicker"
    xmlns:local="clr-namespace:pdftron.PDF.Tools"
    Title="Color"
    MinHeight="250"
    MinWidth="250"
    MaxWidth="500"
    MaxHeight="500"
    Width="300"
    Height="300"
    ResizeMode="CanResizeWithGrip"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterOwner" 
    x:Name="this">
    
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <UniformGrid x:Name="PresetColorGrid" Rows="4" Columns="4">
            <UniformGrid.Resources>
                <Style TargetType="Button">
                    <Setter Property="Width" Value="36"/>
                    <Setter Property="Height" Value="36"/>
                </Style>
                <Style TargetType="Rectangle">
                    <Setter Property="Width" Value="30"/>
                    <Setter Property="Height" Value="30"/>
                    <Setter Property="HorizontalAlignment" Value="Center"/>
                    <Setter Property="VerticalAlignment" Value="Center"/>
                </Style> 
            </UniformGrid.Resources>
        </UniformGrid>
        
        <Grid Grid.Row="1" Margin="20 5 20 5">
            <Border BorderBrush="Black" BorderThickness="2" Width="100" Height="60" HorizontalAlignment="Left">
                <TextBlock FontSize="30" Text="Empty" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <Rectangle x:Name="ColorRectangle" Width="100" Height="60" Fill="Blue" HorizontalAlignment="Left"/>
        </Grid>
        
        <!-- Accept or Cancel -->
        <Grid Grid.Row="2" Margin="25 3 25 3"> 
        <Button x:Name="NoColorButton"  Content="No Color" HorizontalAlignment="Left" Click="NoColor_Click" />
        <StackPanel  Orientation="Horizontal" HorizontalAlignment="Right">
            <StackPanel.Resources>
                <Style TargetType="Button">
                    <Setter Property="MinWidth" Value="50"/>
                    <Setter Property="MinHeight" Value="20"/>
                </Style>
            </StackPanel.Resources>
            <Button Name="OkButton" IsDefault="True" Click="OkButton_Click">OK</Button>
            <Button Name="OancelButton" IsCancel="True" Margin="15 0 0 0">Cancel</Button>
        </StackPanel>
        </Grid>

    </Grid >

</Window>