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

    <views:BasePage.BindingContext>
        <vm:LoginWebPageViewModel />
    </views:BasePage.BindingContext>

    <views:BasePage.Content>
        <Grid VerticalOptions="FillAndExpand"
              HorizontalOptions="FillAndExpand"
              RowSpacing="0" ColumnSpacing="0" BackgroundColor="#FF0066CC">

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

            <cr:ExtWebView x:Name="LoginBrowser"
                           Grid.Row="0"
                           Navigating="OnBrowserNavigating"
                           Navigated="OnBrowserNavigated"
                           UrlReturned="OnUrlReturned"
                           ReturnUrls="https://val.18app.italia.it/BeneficiarioWeb/#/registrazione" />

            <Label x:Name="MessageLabel"
                   Grid.Row="0"
                   TextColor="White"
                   HorizontalOptions="Center"
                   VerticalOptions="Center"
                   IsVisible="false" />
        </Grid>
    </views:BasePage.Content>
</views:BasePage>