<Page
    x:Class="Posterizer.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Posterizer"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    
    <Page.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="FontSize" Value="18" />
            <Setter Property="TextAlignment" Value="Center" />
        </Style>
    </Page.Resources>

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid Name="controlPanelGrid" 
              Grid.Column="0"
              Margin="12 0"
              HorizontalAlignment="Center"
              VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <TextBlock Text="Czerwony" Grid.Row="0" Grid.Column="0" />
            <TextBlock Text="Zielony" Grid.Row="0" Grid.Column="1" />
            <TextBlock Text="Niebieski" Grid.Row="0" Grid.Column="2" />
            <TextBlock Text="Wszystkie" Grid.Row="0" Grid.Column="3" />
            
            <CheckBox Name="monochromeCheckBox"
                      Content="Monochromatyczny"
                      Grid.Row="9"
                      Grid.Column="0"
                      Grid.ColumnSpan="4"
                      Margin="0 12"
                      HorizontalAlignment="Center"
                      Checked="OnCheckBoxChecked"
                      Unchecked="OnCheckBoxChecked" />
        </Grid>

        <Image Name="image"
               Grid.Column="1" />
    </Grid>

    <Page.BottomAppBar>
        <AppBar>
            <Grid>
                <StackPanel Orientation="Horizontal" 
                            HorizontalAlignment="Right">
                    <Button Style="{StaticResource OpenFileAppBarButtonStyle}"
                            Click="OnOpenAppBarButtonClick" />

                    <Button Name="saveAsButton"
                            IsEnabled="False"
                            Style="{StaticResource SaveLocalAppBarButtonStyle}"
                            AutomationProperties.Name="Zapisz jako"
                            Click="OnSaveAsAppBarButtonClick" />
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>
</Page>
