<UserControl x:Class="PDFViewWPFTestCS.Controls.ColorPicker"
             x:Name="ColorPickerControl"
             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="using:PDFViewWPFTestCS"
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="200">
    <Grid>
        <ListBox Name="colorlistbox" SelectedValuePath="Tag">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel IsItemsHost="True" Orientation= "Horizontal" 
                                       Width="{Binding (FrameworkElement.ActualWidth), RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}"
                                       MinWidth="{Binding ItemWidth, RelativeSource={RelativeSource Self}}" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBoxItem Tag="#FF0000">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="Red" Height="12" Width="12" />
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="#FFA500">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="Orange" Height="12" Width="12"/>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="#FFFF00">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="Yellow" Height="12" Width="12"/>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="#90EE90" >
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="LightGreen" Height="12" Width="12"/>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="#008000">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="Green" Height="12" Width="12"/>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="#0000FF">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="Blue" Height="12" Width="12"/>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="#000000">
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Rectangle Stroke="Black" Fill="Black" Height="12" Width="12"/>
                </StackPanel>
            </ListBoxItem>
            <ListBoxItem Tag="Transparent" >
                <StackPanel Orientation="Horizontal" Margin="2">
                    <Grid>
                        <Rectangle Stroke="Black" Fill="Transparent" Height="12" Width="12"/>
                        <Line X1="1" X2="11" Y1="1" Y2="11" Stroke="Red" StrokeThickness="2"/>
                    </Grid>
                </StackPanel>
            </ListBoxItem>
        </ListBox>
    </Grid>
</UserControl>
