-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fixed BackButton visibility issue when switching tabs without NavigationPage #28371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…that does not have a NavigationPage.
|
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. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this 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 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
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
src/Controls/src/Core/Platform/Windows/Extensions/ToolbarExtensions.cs
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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