<?xml version="1.0" encoding="utf-8" ?>
<views:BasePage xmlns="http://xamarin.com/schemas/2014/forms"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:Class="Italia.DiciottoApp.Views.WelcomePage"
                xmlns:views="clr-namespace:Italia.DiciottoApp.Views"
                xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" 
                ios:Page.UseSafeArea="true"
                BackgroundColor="{StaticResource AppBkgndColor}" >


    <Grid Margin="0" RowSpacing ="0" ColumnSpacing="0" >
            
        <Grid.Padding>
            <OnPlatform x:TypeArguments="Thickness">
                <On Platform="iOS" Value="0, 0, 0, 0" />
            </OnPlatform>
        </Grid.Padding>

        <Grid.RowDefinitions>
            <RowDefinition Height="48" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="64" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image Grid.Row="0" Grid.ColumnSpan="2"
               Source="header_logo.png" />

        <Image x:Name="BackImage" Aspect="AspectFill"
               Grid.Row="1" Grid.RowSpan="3" Grid.ColumnSpan="2"
               Source="bkgnd_libri.png" />

        <StackLayout Grid.Row="1" Grid.ColumnSpan="2"
                     Spacing="0"
                     Margin="0,40,0,0">
            <Label Text="Hai 18 anni?"
                   Style="{StaticResource Key=BoldLabelStyle}"
                   HorizontalOptions="Center"
                   TextColor="White"
                   FontSize="32"/>
            <Label Text="Per te"
                   Style="{StaticResource Key=RegularLabelStyle}"
                   Margin="0,-7,0,0"
                   HorizontalOptions="Center"
                   TextColor="White"
                   FontSize="16" />
            <Image Source="bonus.png" Margin="0,8,0,0" Scale=".65"/>
            <Label Text="da spendere in"
                   Style="{StaticResource Key=RegularLabelStyle}"
                   HorizontalOptions="Center"
                   TextColor="White"
                   FontSize="16" />
        </StackLayout>

        <Label Grid.Row="2" Grid.ColumnSpan="2"
               x:Name="ExpenceTitle" Text="libri "
               Style="{StaticResource Key=ItalicLabelStyle}"
               HorizontalOptions="Center"
               VerticalOptions="Center"
               TextColor="White"
               FontSize="40"/>

        <Button Grid.Row="3" Grid.Column="0"
                Text="INFORMAZIONI"
                Style="{StaticResource Key=InfoButtonStyle}"
                Clicked="ButtonInfo_Clicked" />
        
        <Button Grid.Row="3" Grid.Column="1"
                Text="NON HAI SPID?"
                Style="{StaticResource Key=InfoButtonStyle}"
                Clicked="ButtonSpidInfo_Clicked" />

        <Button Grid.Row="4" Grid.ColumnSpan="2"
                HorizontalOptions="Center"
                Image="logo_utente_spid.png"
                Text="ENTRA CON SPID"
                VerticalOptions="Center"
                Style="{StaticResource Key=LoginButtonStyle}"
                Clicked="ButtonLogin_Clicked" />
    </Grid>
</views:BasePage>