3

I'm trying to hide or remove the Navigation Bar in Xamarin Shell Application. but it didnt work for IOS or Android .Please Help

Community
  • 1
  • 1
Maalik
  • 129
  • 1
  • 12
  • Does this answer your question? [Remove navigation bar on Xamarin Forms app with Caliburn.Micro](https://stackoverflow.com/questions/36656895/remove-navigation-bar-on-xamarin-forms-app-with-caliburn-micro) – Argon Feb 12 '20 at 09:19
  • 1
    Does this answer your question? [Xamarin Forms - Getting Rid of Back Button In Nav Bar](https://stackoverflow.com/questions/24935929/xamarin-forms-getting-rid-of-back-button-in-nav-bar) – JKennedy Feb 12 '20 at 17:03

3 Answers3

6

Finally I found the answer.

Shell.SetNavBarIsVisible(this, false);

I added this code line to the constructor now it works. Thank you vary much for answers.

Maalik
  • 129
  • 1
  • 12
0

On the Backend so the Xaml.cs

Rather add the follow within your page constructor:

NavigationPage.SetHasNavigationBar(this, false);

Argon
  • 791
  • 1
  • 9
  • 27
Azurry
  • 491
  • 3
  • 16
0

just add NavigationPage.HasNavigationBar="False" in the Content Page tag after adding this to you code it will look someting like this

<ContentPage
x:Class="YouAppPackage.View.PageName"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
NavigationPage.HasNavigationBar="False">

or you can also set it from pages code behind

NavigationPage.SetHasNavigationBar(this, false);

after adding this your code will look something like this

public YourPageName()
{  
   InitializeComponent();
   NavigationPage.SetHasNavigationBar(this, false);
}

hope this helps you

Jay Bhatia
  • 98
  • 12