[BUG] StatusBarBehavior not reflected on back navigation
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Did you read the “Reporting a bug” section on Contributing file?
- I have read the “Reporting a bug” section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
When I navigate to a page that has a StatusBarBehavior
and then back the previous colors are kept even if the page I returned to specifies a behavior with different colors.
Expected Behavior
The colors to change whenever a user navigates.
Steps To Reproduce
Click the Navigate button and then navigate back
Link to public reproduction project repository
https://github.com/pikausp/BackNavigationRepro
Environment
- .NET MAUI CommunityToolkit: 5.1.0
- OS: Android 13/iOS 16.4.1
- .NET MAUI: 7.0.86/7.0.100
Anything else?
No response
Issue Analytics
- State:
- Created 4 months ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Odd Navigation Bar/Status Bar behavior in Swift
Scenario 2: If the table was NOT scrolled to the very top when the row was selected, the navigation bar/status bar behavior is...
Read more >StatusBarBehavior - .NET MAUI Community Toolkit
The StatusBarBehavior is a behavior allows you to control the statusbar's style.
Read more >Sands of MAUI: Issue #73
Gerald starts off bringing in the .NET MAUI Community Toolkit NuGet package and adding StatusBarBehavior to a page—developers can customize the ...
Read more >.NET MAUI Community Toolkit v1.3 Supports Gravatar (' ...
Another new construct, StatusBarBehavior , helps developers customize -- via code or in XAML -- the color and style of the status bar...
Read more >Origami Community | Michael Tomkins made an example ...
Michael Tomkins made an example of a collapsible navigation bar and sticky header using the scrollaway and clip patch. https://www.dropbox.com/.../mta.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree with @pikausp. I expect the status bar to change when the page the behavior is attached to becomes visible. So effectively the
OnAppearing
logic@pictos page A has a style, page B has a different style. Would you say it makes sense for the page A to have the style of Page B when returned to?
I could understand if you wanted a property on the behavior to activate this behavior, but I think it’s a reasonable request/expectation.