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

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

    <Grid
        Margin="20,20,20,20">
        <Grid.RowDefinitions>
            <RowDefinition Height="15*"/>
            <RowDefinition Height="28*"/>
            <RowDefinition Height="28*"/>
            <RowDefinition Height="28*"/>
        </Grid.RowDefinitions>

        <StackLayout
            Grid.Row="0">
            <ImageButton Source="ArrowSettingsBack.png"
                    VerticalOptions="Start" 
                    HorizontalOptions="StartAndExpand" 
                    HeightRequest="40" 
                    WidthRequest="50"                    
                    Clicked="SettingToHomePage"
                    BackgroundColor="{DynamicResource BlackColor}"
                    Margin="10,10,0,0"/>
        </StackLayout>
        
        <Grid
            Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="33*"/>
                <ColumnDefinition Width="33*"/>
                <ColumnDefinition Width="33*"/>
            </Grid.ColumnDefinitions>

            <Label
                Grid.Column="0"
                HorizontalTextAlignment="Start"
                Text ="Langage"
                FontSize="25"               
                TextColor="{DynamicResource WhiteColor}"
                VerticalTextAlignment="Center"/>

            <StackLayout
                Grid.Column="1"
                Orientation="Horizontal">

                <Label
                    Text="English"
                    FontSize="25"
                    TextColor="{DynamicResource WhiteColor}"
                    VerticalTextAlignment="Center"/>
        
                <CheckBox
                    IsChecked="False"
                    x:Name="CBBr"
                    CheckedChanged="CBBr_CheckedChanged"
                    Color="{DynamicResource SkyBlueColor}"
                    />

            </StackLayout>
            
            <StackLayout
                Grid.Column="2"
                Orientation="Horizontal">
                <Label
                    Text="Français"
                    FontSize="25"               
                    TextColor="{DynamicResource WhiteColor}"
                    VerticalTextAlignment="Center"/>
        
                <CheckBox
                    IsChecked="True"
                    x:Name="CBFr"
                    CheckedChanged ="CBFr_CheckedChanged"/>
            </StackLayout>
            
        </Grid>

        <StackLayout
            Grid.Row="2"
            Orientation="Horizontal">

            <Label
                HorizontalTextAlignment="Start"
                Text="Mode Extreme : "
                FontSize="25"               
                TextColor="{DynamicResource WhiteColor}"/>
        
            <Switch
                OnColor="{DynamicResource SkyBlueColor}"
                ThumbColor="WhiteSmoke"
                Margin="30,0,0,50"/>

        </StackLayout>
        
        <StackLayout
            Grid.Row="3"
            Orientation="Horizontal">

            <Label
                Text="Thème Clair : "
                FontSize="25"
                TextColor="{DynamicResource WhiteColor}"/>

            <Switch
                Toggled="Switch_Toggled_Theme"
                Margin="30,0,0,50"
                x:Name="swTheme" 
                OnColor="{DynamicResource SkyBlueColor}"
                ThumbColor="WhiteSmoke"/>
        </StackLayout>
        
    </Grid>
    
</ContentPage>
