<?xml version="1.0" encoding="UTF-8"?>

<ContentPage
    BackgroundColor="{DynamicResource BlackColor}"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="TheGameExtreme.view.GamePreparationPage">

    <Grid
        Margin="5,0,5,5">
        <Grid.RowDefinitions>
            <RowDefinition Height="10*" />
            <RowDefinition Height="20*" />
            <RowDefinition Height="20*" />
            <RowDefinition Height="20*" />
            <RowDefinition Height="30*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50*" />
            <ColumnDefinition Width="50*" />
        </Grid.ColumnDefinitions>

        <StackLayout
            Grid.Row="0"
            Grid.Column="0">
            <ImageButton Source="ArrowSettingsBack.png"
                VerticalOptions="Start" 
                HorizontalOptions="StartAndExpand" 
                HeightRequest="40" 
                WidthRequest="50"                    
                Clicked="Back"
                BackgroundColor="Transparent"
                Margin="10,10,0,0"/>
        </StackLayout>

        

        
        <StackLayout
            Grid.Row="1"
            Grid.Column="1"
            Margin="0,0,50,0">
            <Label Text="Nombre de joueur : "
                   TextColor="{DynamicResource WhiteColor}"
                   FontSize="16"
                   VerticalTextAlignment="Center"
                   HorizontalTextAlignment="Center"/>
            <Picker
                    x:Name="PlayerSelecter"
                    BackgroundColor="{DynamicResource SkyBlueColor}"
                    SelectedIndexChanged="ChangedPseudo"
                    HorizontalOptions="Center"
                    VerticalOptions="Center"
                    WidthRequest="220"                    
                    Margin="50,0,50,0"/>            
        </StackLayout>

        <StackLayout 
            Grid.Row="2"
            Grid.Column="1"
            Margin="0,0,50,0">
            <Label Text="Jouer avec des valeurs :"
                   TextColor="{DynamicResource WhiteColor}"
                   FontSize="16"
                   VerticalTextAlignment="Center"
                   HorizontalTextAlignment="Center"/>
            <Picker
                x:Name="SelectMode"
                BackgroundColor="{DynamicResource SkyBlueColor}"
                SelectedIndexChanged="SelectMode_SelectedIndexChanged"
                HorizontalOptions="Center"
                VerticalOptions="Center"
                WidthRequest="220"
                Margin="50,0,50,0"/>
        </StackLayout>

        <StackLayout
            Grid.Column="1"
            Grid.Row="3"
            Margin="0,0,50,0">

            <Label Text="Nombre de pile en jeu :"
                   TextColor="{DynamicResource WhiteColor}"
                   FontSize="16"
                   VerticalTextAlignment="Center"
                   HorizontalTextAlignment="Center"/>
            <Picker x:Name="SelectNbStack"
                        BackgroundColor="{DynamicResource SkyBlueColor}"
                        SelectedIndexChanged="SelectNbStack_Changed"                                               
                        Margin="50,0,50,0"
                        WidthRequest="220"
                        HorizontalOptions="Center"
                        VerticalOptions="Center"/>
        </StackLayout>




        
            <StackLayout
                x:Name="NameList"
                Grid.Row="0"
                Grid.Column="0"
                Margin="50,30,50,0">
            <Label Text="Nom des joueurs"
                   TextColor="{DynamicResource WhiteColor}"
                   FontSize="16"
                   VerticalTextAlignment="Center"
                   HorizontalTextAlignment="Center"/>
            </StackLayout>
            <StackLayout
                Grid.Column="0"
                Grid.Row="1"
                Margin="50,27,50,0">
            <!--<Frame BackgroundColor="{DynamicResource SkyBlueColor}"
                   CornerRadius="10"
                   HeightRequest="45"
                   VerticalOptions="Center"
                   HorizontalOptions="Center"
                   WidthRequest="120">
                    <Entry
                        BackgroundColor="{DynamicResource SkyBlueColor}"                    
                        Placeholder="Pseudo"
                        HorizontalTextAlignment="Start"/>
                </Frame>-->
                <Entry
                    BackgroundColor="{DynamicResource SkyBlueColor}"                    
                    Placeholder="Pseudo"
                    HorizontalTextAlignment="Start"
                    HeightRequest="45"/>
            </StackLayout>
        




        <StackLayout
            Grid.Row="4"
            Grid.Column="0"
            Grid.ColumnSpan="2">
            <Button
                Margin="0,55,0,0"
                Text="Play"
                Clicked="Play"
                HorizontalOptions="End"
                WidthRequest="220"
                BackgroundColor="{DynamicResource SkyBlueColor}"
                CornerRadius="10"/>
        </StackLayout>

    </Grid>

</ContentPage>
