<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    x:Class="iElection.Views.LoginPage"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:materialFrame="http://sharpnado.com"
    xmlns:prism="http://prismlibrary.com"
    prism:ViewModelLocator.AutowireViewModel="True"
    BackgroundColor="#e6e6e6"
    FlowDirection="RightToLeft"
    NavigationPage.HasNavigationBar="False">
    <Grid RowDefinitions="Auto,*">
        <Grid Margin="0,0,0,20" HeightRequest="140">

            <Frame
                Margin="-150,0,-150,-20"
                BackgroundColor="{StaticResource Info}"
                HeightRequest="200"
                Rotation="2" />
            <Frame
                Margin="-150,-200,-150,0"
                BackgroundColor="{StaticResource PrimaryColor}"
                HeightRequest="150"
                Rotation="-7" />
            <Label
                FontFamily="{StaticResource ShabnameBold}"
                FontSize="Large"
                HorizontalOptions="Center"
                Text="ورود"
                TextColor="White"
                VerticalOptions="Center" />
        </Grid>
        <StackLayout
            Grid.Row="1"
            Padding="10"
            VerticalOptions="Center">
            <materialFrame:MaterialFrame
                Margin="10,8"
                Padding="8,3"
                HasShadow="True"
                MaterialTheme="Acrylic">
                <Entry
                    FontSize="Small"
                    Placeholder="نام کاربری"
                    Text="{Binding Path=PageDto.Phone, Mode=TwoWay}" />
            </materialFrame:MaterialFrame>
            <materialFrame:MaterialFrame
                Margin="10,8"
                Padding="8,3"
                HasShadow="True"
                MaterialTheme="Acrylic">
                <Entry
                    FontSize="Small"
                    HorizontalTextAlignment="End"
                    IsPassword="True"
                    Placeholder="رمز عبور"
                    Text="{Binding Path=PageDto.Password, Mode=TwoWay}" />
            </materialFrame:MaterialFrame>

            <Grid ColumnDefinitions="7*,3*">
                <Button
                    Margin="0,8,10,8"
                    BackgroundColor="{StaticResource Success}"
                    Command="{Binding LoginCommand}"
                    CornerRadius="8"
                    FontFamily="{StaticResource ShabnameBold}"
                    Text="ورود"
                    TextColor="White" />
                <Button
                    Grid.Column="1"
                    Margin="10,8,0,8"
                    BackgroundColor="{StaticResource Info}"
                    Command="{Binding SignUpCommand}"
                    CornerRadius="8"
                    FontFamily="{StaticResource ShabnameBold}"
                    Text="ثبت نام"
                    TextColor="White" />

            </Grid>
            <Button
                Margin="0,10"
                BackgroundColor="Transparent"
                Command="{Binding ForgetPassCommand}"
                HorizontalOptions="Center"
                Text="فراموشی رمز عبور" />
        </StackLayout>
    </Grid>

</ContentPage>