Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[Bug] Shell - Navigation.PushAsync - Navigation Bar ignored on iOS #6604

Open
@bridgesquared

Description

@bridgesquared

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

  1. Create new Mobile App (Xamarin Forms) project in Visual Studio (Windows) 16.1.3
  2. Select 'Shell' template
  3. Run solution (iOS + Android)
  4. 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

Screenshots

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    a/shell 🐚a/templatesIssue with the File > New templates in Visual Studioe/1 🕐1good first issuehacktoberfest 🍻help wantedWe welcome community contributions to any issue, but these might be a good place to start!inactiveIssue is older than 6 months and needs to be retestedp/iOS 🍎t/bug 🐛up-for-grabsWe welcome community contributions to any issue, but these might be a good place to start!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions