[Bug] Shell - Navigation.PushAsync - Navigation Bar ignored on iOS #6604
Description
Description
I created a new Xamarin Forms project using the Shell Template. From the ItemsPage, when navigating to the detail page using await Navigation.PushAsync(new ItemDetailPage(new ItemDetailViewModel(item)))
the detail ContentPage ignores the Shell Navigation Bar on iOS.
Steps to Reproduce
- Create new Mobile App (Xamarin Forms) project in Visual Studio (Windows) 16.1.3
- Select 'Shell' template
- Run solution (iOS + Android)
- Click an item in the 'Browse' screen
Expected Behavior
I expected the Item Detail page to respect the page boundaries and show all content below the Navigation Bar
Actual Behavior
On iOS the top of the Item Detail page is displayed underneath (hidden by) the Navigation Bar.
Comments
I tried changing the code to use a registered route and to use the Shell.Current.GotoAsync("itemdetail")
approach but this also failed to show the page correctly.
As an aside, I note that the 'Add' function uses await Navigation.PushModalAsync(new NavigationPage(new NewItemPage()))
to show a navigation bar for the user to back out of the modal dialog, it seems to me that under the shell model the NavigationPage shouldn't be needed, the target page should have to opt out of the shell navigation bar using Shell.NavBarIsVisible="false"
.
Please can we have detailed guidance on how to handle these options when using Shell.
Basic Information
- Version with issue: 4.0.0.425677
- Last known good version: n/a
- IDE: Visual Studio Pro (WindowS) 2019 v 16.1.3
- Platform Target Frameworks:
- iOS: 12.2
- Android: 9.0 - API 28
- Android Support Library Version: ?
- Nuget Packages: 4.0.0.425677
- Affected Devices: Running in Simulators (though checked iOS device and same issue)
Same behaviour seen on 4.1.0 pre2