<Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:StarPatterns"
        mc:Ignorable="d"
        Title="MainWindow" Height="850" Width="1000" Loaded="Window_Loaded" Closing="Window_Closing">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition Width="auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Border Grid.Column="0" Margin="10" BorderBrush="Black" BorderThickness="4">
            <Canvas Name="canvas1" ClipToBounds="True"></Canvas>
        </Border>
        <StackPanel Grid.Column="1" Margin="10">
            <ListBox SelectedIndex="0" Name="LstTiling" SelectionChanged="ListBox_SelectionChanged" Margin="0,0,0,10" Height="280">
                <ListBoxItem>Triangle Tiling #1</ListBoxItem>
                <ListBoxItem>Triangle Tiling #2</ListBoxItem>
                <ListBoxItem>Triangle Tiling #3</ListBoxItem>
                <ListBoxItem>Rectangle Tiling #1</ListBoxItem>
                <ListBoxItem>Rectangle Tiling #2</ListBoxItem>
                <ListBoxItem>Pentagon Tiling</ListBoxItem>
                <ListBoxItem>Hexagon Tiling #1</ListBoxItem>
                <ListBoxItem>Hexagon Tiling #2</ListBoxItem>
                <ListBoxItem>Octagon Tiling #1</ListBoxItem>
                <ListBoxItem>OctagonTiling #2</ListBoxItem>
                <ListBoxItem>Decagon Tiling</ListBoxItem>
                <ListBoxItem>Dodecagon Tiling #1</ListBoxItem>
                <ListBoxItem>Dodecagon Tiling #2</ListBoxItem>
            </ListBox>
            <GroupBox Header="Tile Sizes">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Label Grid.Row="0" Grid.Column="0">Horizontal:</Label>
                    <Grid Grid.Row="0" Grid.Column="1" Margin="5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="13" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="13" />
                            <RowDefinition Height="13" />
                        </Grid.RowDefinitions>
                        <TextBox Name="TxtHorSize"  Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" TextAlignment="Center" TextChanged="TxtHorSize_TextChanged">4</TextBox>
                        <RepeatButton Name="BtnHorSizeUP"  Grid.Column="1" Grid.Row="0" FontSize="8" FontFamily="Marlett" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Click="BtnHorSizeUP_Click">5</RepeatButton>
                        <RepeatButton Name="BtnHorSizeDown"  Grid.Column="1" Grid.Row="1" FontSize="8"  FontFamily="Marlett" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Height="13" VerticalAlignment="Bottom" Click="BtnHorSizeDown_Click">6</RepeatButton>
                    </Grid>
                    <Label Grid.Row="1" Grid.Column="0">Vertical:</Label>
                    <Grid Grid.Row="1" Grid.Column="1" Margin="5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="13" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="13" />
                            <RowDefinition Height="13" />
                        </Grid.RowDefinitions>
                        <TextBox Name="TxtVertSize"  Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" TextAlignment="Center" TextChanged="TxtVertSize_TextChanged">4</TextBox>
                        <RepeatButton Name="BtnVertSizeUP"  Grid.Column="1" Grid.Row="0" FontSize="8" FontFamily="Marlett" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Click="BtnVertSizeUP_Click">5</RepeatButton>
                        <RepeatButton Name="BtnVertSizeDown"  Grid.Column="1" Grid.Row="1" FontSize="8"  FontFamily="Marlett" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Height="13" VerticalAlignment="Bottom" Click="BtnVertSizeDown_Click">6</RepeatButton>
                    </Grid>
                </Grid>
            </GroupBox>
            <GroupBox Header="Tile Colors" Margin="0,10,0,0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <ComboBox Grid.Row="0" Name="CmbColor1" SelectionChanged="GetColors" Margin="0,5,0,0"></ComboBox>
                    <ComboBox Grid.Row="1" Name="CmbColor2" SelectionChanged="GetColors"></ComboBox>
                    <ComboBox Grid.Row="2" Name="CmbColor3" SelectionChanged="GetColors"></ComboBox>
                    <ComboBox Grid.Row="3" Name="CmbColor4" SelectionChanged="GetColors"></ComboBox>
                    <ComboBox Grid.Row="4" Name="CmbColor5" SelectionChanged="GetColors"></ComboBox>
                    <ComboBox Grid.Row="5" Name="CmbColor6" SelectionChanged="GetColors"></ComboBox>
                </Grid>
            </GroupBox>

            <GroupBox Header="Star Parameters">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Label Grid.Row="0">Midpoint spacing:</Label>
                    <Slider Grid.Row="1" Margin="5" Name="SldDelta" ValueChanged="SldDelta_ValueChanged"  Minimum="0" Maximum="50" SmallChange="1" LargeChange="5" TickFrequency="5" TickPlacement="BottomRight"></Slider>
                    <Label Grid.Row="2">Hankin Angle:</Label>
                    <Slider Grid.Row="3" Margin="5" Name="SldAngle" ValueChanged="SldAngle_ValueChanged"  Minimum="0" Maximum="90" SmallChange="1" LargeChange="5" TickFrequency="10" TickPlacement="BottomRight"></Slider>
                    <Label Grid.Row="4" Margin="5">Star Color:</Label>
                    <ComboBox Grid.Row="5" Name="CmbStarColor" SelectionChanged="GetColors"></ComboBox>
                    <CheckBox Grid.Row="6" Name="CbShowStar" IsChecked="true" Click="CbShowStar_Click" Margin="0,10,0,0">Show Stars</CheckBox>
                </Grid>
            </GroupBox>
        </StackPanel>
    </Grid>
</Window>
