<Window x:Class="Settings"
        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"
        mc:Ignorable="d"
        Title="Settings" Height="425.593" Width="250" WindowStyle="ToolWindow" SizeToContent="Height">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Orientation="Horizontal" >
            <Label Margin="15,5,5,5">SandPile Type:</Label>
            <TextBox Margin="5" Width="120" Name="TxtType" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" ></TextBox>
        </StackPanel>
        <GroupBox Grid.Row="1" Margin="5,5,5,10" BorderBrush="Blue" BorderThickness="1" Header="Sandpile Settings:">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,0,10">Maximum Sand per Cell</Label>
                <TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"  Name="TxtMaxSand" Margin="5,5,5,10" Width="60" HorizontalAlignment="Left"></TextBox>
                <Label Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" Margin="0,0,0,10">Initial Sand amount</Label>
                <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"  Name="TxtInitialSand" Margin="5,5,5,10" Width="60" HorizontalAlignment="Left"></TextBox>

                <RadioButton Grid.Row="2" Margin="15,5,0,5" Name="RB4way" IsChecked="True" GroupName="Distribute" Click="RB4way_Click">Distribute 4 way</RadioButton>
                <RadioButton Grid.Row="3" Margin="15,5,0,5" Name="RB8Way" IsChecked="False" GroupName="Distribute" Click="RB8Way_Click">Distribute 8 way</RadioButton>
            </Grid>
        </GroupBox>
        <GroupBox Grid.Row="2" Margin="5,5,5,10" BorderBrush="Blue" BorderThickness="1" Header="Colors:">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition></ColumnDefinition>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <ListBox Grid.Row="0" Name="LBColors"></ListBox>
            </Grid>
        </GroupBox>
        <Grid  Grid.Row="3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition Width="auto"></ColumnDefinition>
                <ColumnDefinition></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Button Grid.Column="0" Margin="5,5,5,10" Width="80" Height="25" Name="BtnStart" Click="BtnStart_Click" BorderThickness="1">Start</Button>
            <Button Grid.Column="2" Margin="5,5,5,10" Width="80" Height="25" Name="BtnClose" Click="BtnClose_Click">Close</Button>
        </Grid>        
    </Grid>
</Window>
