Miguel Febres
Miguel Febres

Reputation: 2183

Remove blue bar above navigation bar in Xamarin.Forms

I have implemented a Master Detail Page according to this link but for some reason I am getting a blue bar above the navigation bar that I am not sure what is and how to remove it.

enter image description here

When opening the menu:

enter image description here

How I can remove that?

Upvotes: 2

Views: 1588

Answers (2)

nevermore
nevermore

Reputation: 15786

I think you have two navigationPages in your project.

In your App.cs, are you adding a navigationPage on the MainPage like this:

public class App : Application
{
    public App ()
    {
        MainPage = new NavigationPage(new MasterDetailPageNavigation.MainPage());
    }
}

This will cause the blue bar above navigation bar.

Remove it and the blue bar would disappear:

   MainPage = new MasterDetailPageNavigation.MainPage();

Upvotes: 2

Saamer
Saamer

Reputation: 5099

In your Xamarin.Forms Page constructor, add this line to hide the Toolbar

NavigationPage.SetHasNavigationBar(this, false);

From my understanding, you are using a Push to come to this page from a Login page. You might want to change your main ContentPage to be the newer Dashboard page, so

if (Authenticated)
    ContentPage = new DashboardPage();

Upvotes: 0

Related Questions