Xamarin.forms: [Bug] [UWP] NavigationPage.HasNavigationBar="false" does not play well with MasterDetailPage.

Created on 15 Jan 2020  路  2Comments  路  Source: xamarin/Xamarin.Forms

Description

The navigation bar comes back after navigating if NavigationPage.HasNavigationBar=false is used on a page inside a MasterDetailPage.

Steps to Reproduce

  1. Create the following structure: MasterDetailPage -> (Detail)NavigationPage -> ContentPage (with NavigationPage.HasNavigationBar="false")
  2. Push a new page (also with NavigationPage.HasNavigationBar="false") onto the detail navigation stack.

Expected Behavior

Navigation bar is not visible

Actual Behavior

Navigation bar is visible.

Basic Information

  • Version with issue: 4.4.0.991477
  • Platform Target Frameworks:

    • UWP: Target 1903, Min 1809

Reproduction Link

https://github.com/GalaxiaGuy/xf-masterdetailpage-bug

3 UWP bug

Most helpful comment

your workaround works but so nasty indeed :) we need to pick up this issue.

All 2 comments

I think this has been broken a very, very long time. If you are using "Popover" for your master behaviour, this workaround should fix it: https://github.com/xamarin/Xamarin.Forms/issues/1437#issuecomment-441178867

Its not the nicest workaround and it probably isn't very temporary as this looks to be an old issue. I'd recommend creating a class that inherits from ContentPage then adding this workaround.

your workaround works but so nasty indeed :) we need to pick up this issue.

Was this page helpful?
0 / 5 - 0 ratings