Skip to content

Conversation

@SyedAbdulAzeemSF4852
Copy link
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issue Details

  • On iOS, when navigating from a ContentPage with the Shell navigation bar hidden (Shell.SetNavBarIsVisible(this, false)) and Shell Flyout disabled (contains a content view that has the navigation button), to another ContentPage with the navigation bar visible (Shell.SetNavBarIsVisible(this, true)), navigating back causes the navigation bar to remain visible on the original page, even though it should be hidden.

Break/Regression Information

Root Cause

  • The navigation bar visibility was not being updated during navigation transitions in the WillShowViewController method, causing the navigation bar to remain visible when navigating back to pages where Shell.NavBarIsVisible is set to false, because the calculated navBarVisible value was never applied to the UINavigationController.

Description of Change

  • Added a call to navigationController.SetNavigationBarHidden in the WillShowViewController method to apply the calculated navigation bar visibility state at the correct point in the iOS navigation lifecycle. The Shell.NavBarVisibilityAnimationEnabled property is used to determine whether the visibility change should be animated, ensuring the navigation bar is correctly shown or hidden based on each page’s settings.

Issues Fixed

Fixes #32583

Validated the behaviour in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Output

Before After
Before.mov
After.mov

… Back to a ContentPage with NavigationBar Hidden
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 14, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@SyedAbdulAzeemSF4852! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Nov 14, 2025
@sheiksyedm
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 marked this pull request as ready for review November 17, 2025 09:51
Copilot AI review requested due to automatic review settings November 17, 2025 09:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes an iOS-specific Shell navigation bar visibility bug where navigating back to a ContentPage with a hidden navigation bar would incorrectly show the navigation bar. The issue was introduced in PR #29279.

Key Changes

  • Core Fix: Added a call to SetNavigationBarHidden in the WillShowViewController method to apply the calculated navigation bar visibility state during iOS navigation transitions
  • Test Coverage: Added comprehensive UI tests with screenshot verification for iOS and Android platforms
  • Test Implementation: Created test pages demonstrating the issue scenario (main page with hidden nav bar → message page with visible nav bar → back to main page)

Reviewed Changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ShellSectionRenderer.cs Added SetNavigationBarHidden call in WillShowViewController to apply nav bar visibility during transitions with proper animation support
Issue32583.cs (HostApp) Test page implementation with main page (hidden nav bar) and message page (visible nav bar) to reproduce the issue
Issue32583.cs (Tests) UI test that navigates forward and back, then verifies with screenshot that nav bar remains hidden
NavigationBarShouldRemainHiddenAfterNavigatingBack.png (iOS) Baseline screenshot for iOS test verification
NavigationBarShouldRemainHiddenAfterNavigatingBack.png (Android) Baseline screenshot for Android test verification

@PureWeen PureWeen changed the base branch from main to inflight/current November 18, 2025 22:45
@PureWeen PureWeen merged commit 6b13675 into dotnet:inflight/current Nov 18, 2025
1 check passed
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
… Back to a ContentPage with NavigationBar Hidden (#32622)

* [iOS] Fix for Shell Navigation Bar Remaining Visible After Navigating Back to a ContentPage with NavigationBar Hidden

* Added test cases and snapshots for both iOS and Android platforms

* Added snapshot for windows platform
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
… Back to a ContentPage with NavigationBar Hidden (#32622)

* [iOS] Fix for Shell Navigation Bar Remaining Visible After Navigating Back to a ContentPage with NavigationBar Hidden

* Added test cases and snapshots for both iOS and Android platforms

* Added snapshot for windows platform
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
… Back to a ContentPage with NavigationBar Hidden (#32622)

* [iOS] Fix for Shell Navigation Bar Remaining Visible After Navigating Back to a ContentPage with NavigationBar Hidden

* Added test cases and snapshots for both iOS and Android platforms

* Added snapshot for windows platform
PureWeen pushed a commit that referenced this pull request Nov 21, 2025
… Back to a ContentPage with NavigationBar Hidden (#32622)

* [iOS] Fix for Shell Navigation Bar Remaining Visible After Navigating Back to a ContentPage with NavigationBar Hidden

* Added test cases and snapshots for both iOS and Android platforms

* Added snapshot for windows platform
github-actions bot pushed a commit that referenced this pull request Nov 24, 2025
… Back to a ContentPage with NavigationBar Hidden (#32622)

* [iOS] Fix for Shell Navigation Bar Remaining Visible After Navigating Back to a ContentPage with NavigationBar Hidden

* Added test cases and snapshots for both iOS and Android platforms

* Added snapshot for windows platform
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NET 10] Shell Navigation Bar Remains Visible After Navigating Back to ContentPage with NavBar Hidden (iOS Only)

3 participants