<Page
    x:Class="FingerPaint.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FingerPaint"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        
        <Image Name="image" />
        
        <!-- Wyłączenie przycisków wejścia-wyjścia w stanie przyciągniętym -->
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape" />
                <VisualState x:Name="Filled" />
                <VisualState x:Name="FullScreenPortrait" />

                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="fileButtons"
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>

    <Page.BottomAppBar>
        <AppBar>
            <Grid>
                <StackPanel Orientation="Horizontal" 
                            HorizontalAlignment="Left">
                    
                    <Button Style="{StaticResource AppBarButtonStyle}"
                            AutomationProperties.Name="Color"
                            Content="&#x1F308;"
                            Click="OnColorAppBarButtonClick" />
                    
                    <Button Style="{StaticResource EditAppBarButtonStyle}"
                            AutomationProperties.Name="Thickness"
                            Click="OnThicknessAppBarButtonClick" />
                    
                    <Button Style="{StaticResource CopyAppBarButtonStyle}"
                            Click="OnCopyAppBarButtonClick" />
                
                    <Button Name="pasteAppBarButton"
                            Style="{StaticResource PasteAppBarButtonStyle}"
                            Click="OnPasteAppBarButtonClick" />
                </StackPanel>

                <StackPanel Name="fileButtons"
                            Orientation="Horizontal" 
                            HorizontalAlignment="Right">
                    
                    <Button Style="{StaticResource OpenFileAppBarButtonStyle}"
                            Click="OnOpenAppBarButtonClick" />

                    <Button Style="{StaticResource SaveLocalAppBarButtonStyle}"
                            AutomationProperties.Name="Save As"
                            Click="OnSaveAsAppBarButtonClick" />

                    <Button Style="{StaticResource SaveAppBarButtonStyle}"
                            Click="OnSaveAppBarButtonClick" />

                    <Button Style="{StaticResource AddAppBarButtonStyle}"
                            Click="OnAddAppBarButtonClick" />
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>
</Page>
