[Windows] Fixed BackButton visibility issue when switching tabs without NavigationPage#28371
Merged
rmarinho merged 10 commits intodotnet:mainfrom Mar 27, 2025
Merged
[Windows] Fixed BackButton visibility issue when switching tabs without NavigationPage#28371rmarinho merged 10 commits intodotnet:mainfrom
rmarinho merged 10 commits intodotnet:mainfrom
Conversation
…that does not have a NavigationPage.
Contributor
|
Hey there @Vignesh-SF3580! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the issue of the BackButton not updating correctly on Windows when switching tabs without a NavigationPage by ensuring the back button visibility is updated along with the toolbar visibility.
- Added test cases in both the Shared.Tests and HostApp projects to verify the fix.
- Modified the Windows ToolbarExtensions to update the back button visibility using a helper method.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue14689.cs | Added a test verifying back button update behavior. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue14689.cs | Introduced a HostApp scenario for back button update in TabbedPage. |
| src/Controls/src/Core/Platform/Windows/Extensions/ToolbarExtensions.cs | Updated code to call a helper method for consistent back button visibility update. |
src/Controls/src/Core/Platform/Windows/Extensions/ToolbarExtensions.cs
Outdated
Show resolved
Hide resolved
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
reviewed
Mar 18, 2025
src/Controls/src/Core/Platform/Windows/Extensions/ToolbarExtensions.cs
Outdated
Show resolved
Hide resolved
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
jsuarezruiz
approved these changes
Mar 25, 2025
rmarinho
approved these changes
Mar 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Detail
The back button visibility was not updating correctly when the page did not have a NavigationPage.
Root Cause
The back button visibility was being updated only when the parent was a NavigationPage. As a result, it did not update properly when there was no NavigationPage.
Description of Change
Only the toolbar visibility was updated when the page did not have a NavigationPage. Now, the back button visibility is also updated along with the toolbar visibility to resolve the issue.
Tested the behavior in the following platforms
Issues Fixed
Fixes #14689
Screenshots
14689BeforeFix.mp4
14689AfterFix.mp4