Upper Bar Adjust Burger Menu

2

I made an app with a Login screen to a MainView which is a MasterDetail and a Detail. It is working properly but the upper screen is bigger than normal, according to image; How do I set it to be the correct size?

HomeHereistheXAMLcodeforMainView,Master,andDetail.

MainView.xaml

<?xmlversion="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:MVVMApp"
             x:Class="MVVMApp.Views.MainView">
</MasterDetailPage>

Master.xaml

 <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MVVMApp.Views.Master"
             BackgroundColor="Blue"
             Title="ListaViagem"
             Icon="Menu.png">

     <StackLayout Padding="20">
        <Label Text="Menu Lateral"></Label>
     </StackLayout>
   </ContentPage>

Detail.xaml

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="MVVMApp.Views.Detail"
         Title="Detalhe">
</ContentPage>

This is the code for xamls.

Codes in the Navigation MainView.CS:

        public MainView()
    {
        InitializeComponent();
        this.Master = new Master();
        this.Detail = new NavigationPage(new DetailPage());
        //this.BindingContext = new ViewModels.MainViewModel();
    }
    
asked by anonymous 07.11.2017 / 01:45

1 answer

1

I solved the problem:
The error was in the navigation interface when I clicked the login button it performed the navigation function for MainView. Line below:

     public async Task NagateToMain()
    {
        MVVMApp.App.Current.MainPage = new NavigationPage(new Views.MainView());

    }

My Main was inside a Page, as if it had two pages inside the other. To fix I made the change to

    public async Task NagateToMain()
    {
        MVVMApp.App.Current.MainPage = new Views.MainView();
    }

In this way I made the correction. Home Thank you for your help.

    
08.11.2017 / 10:38