<?xml version="1.0" encoding="utf-8" ?>
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
            x:Class="Borepin.Page.MainPage"
            xmlns:resource_text="clr-namespace:Borepin.Resources.Text">
    <FlyoutPage.Flyout>
        <ContentPage Title="FabAccess" BackgroundColor="{StaticResource SecondColor}">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="50"/>
                </Grid.RowDefinitions>
                <StackLayout Grid.Row="0" IsVisible="{Binding IsConnected}" Margin="0, 50, 0, 0">
                    <Button Text="{x:Static resource_text:TextResource.MainPage_Machines}" Command="{Binding NavigateCommand}" CommandParameter="MachineListPage" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
                    <Button Text="{x:Static resource_text:TextResource.MainPage_Users}" IsVisible="{Binding CanManageUsers}" Command="{Binding NavigateCommand}" CommandParameter="UserListPage" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
                </StackLayout>
                <StackLayout Grid.Row="1" VerticalOptions="End" Margin="0, 0, 0, 50">
                    <StackLayout IsVisible="{Binding IsConnected}">
                        <Button Text="{x:Static resource_text:TextResource.MainPage_Profile}" Command="{Binding NavigateCommand}" CommandParameter="ProfilePage" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
                    </StackLayout>
                    <Button Text="{x:Static resource_text:TextResource.MainPage_Servers}" Command="{Binding NavigateCommand}" CommandParameter="ServerListPage" BackgroundColor="{StaticResource SecondColor}" TextColor="{StaticResource FirstColor}"/>
                </StackLayout>
                <StackLayout Grid.Row="2" Margin="10, 0, 0, 10" VerticalOptions="End">
                    <Label Text="{Binding CurrentVersion, StringFormat='Version: {0}'}" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/>
                    <Label Text="{Binding CurrentBuild, StringFormat='Build: {0}'}" Margin="10,0,0,0" TextColor="{StaticResource FirstColor}"/>
                </StackLayout>
            </Grid>
        </ContentPage>
    </FlyoutPage.Flyout>
</FlyoutPage>
