Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to remove navigation bar for navigation page in xaml?


Asked by Zyaire Scott on Dec 08, 2021 FAQ



If we want to remove navigation bar from XAML itself, we have to use the below property. NavigationPage.HasNavigationBar="false" Following is the code snippet that shows how to use “NavigationPage.HasNavigationBar” in a Content page. <!-- Place new controls here --> <Label Text="Welcome to Xamarin.Forms!"
Also,
No navigation bar is displayed on your next page. But wait! There’s another problem; user can move to previous page by using back button on Android phone or by using back button displaying on the top of Windows desktop application. If you want the users to not to go on the previous page again, use the following code to disable back button.
Furthermore, FYI, you can also restyle your NavigationWindow any way you like by changing its ControlTemplate. For example this removes everything but the actual page content:
Similarly,
On Android, a navigation bar is present at the top of the page that displays a title, an icon, and a Back button that returns to the previous page. On the Universal Windows Platform, a navigation bar is present at the top of the page that displays a title.
Consequently,
The Shell.NavBarIsVisible attached property, of type bool, controls if the navigation bar is visible when a page is presented. By default the value of the property is true. While this property can be set on a subclassed Shell object, it's typically set on any pages that want to make the navigation bar invisible.