Skip to content

Changing value of Shell.NavBarIsVisible should change visibility of toolbar (ShellToolbar)#17358

Merged
spadapet merged 2 commits intomainfrom
dev/peterspa/NavBarIsVisibleChanges
Sep 20, 2023
Merged

Changing value of Shell.NavBarIsVisible should change visibility of toolbar (ShellToolbar)#17358
spadapet merged 2 commits intomainfrom
dev/peterspa/NavBarIsVisibleChanges

Conversation

@spadapet
Copy link
Copy Markdown
Contributor

Description of Change

This change updates the visibility of the ShellToolbar as the value of Shell.NavBarIsVisible changes (either through XAML Hot Reload or through code).

For apps that use Shell: The Shell.NavBarIsVisible attached property can be set on any element from the root Shell down to the current Page. The value of Shell.NavBarIsVisible needs to act like its inherited down to the Page.

The old code would copy the value of Shell.NavBarIsVisible down through the element tree. Once it's copied, that's it, it won't be updated by inheritance again. I'm removing that inheritance copy, and instead have the ShellToolbar look for the value of Shell.NavBarIsVisible at the current Page, and go up through parents to the Shell.

ShellToolbar already listened for the PropertyChanged event on the Shell, so that event is being used to notify when any element has a change for Shell.NavBarIsVisible.

Issues Fixed

Fixes #7459 (Shell.NavBarIsVisible does not update on hot reload)

@spadapet spadapet added the partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences label Sep 13, 2023
@spadapet spadapet requested a review from PureWeen September 13, 2023 20:40
@spadapet spadapet self-assigned this Sep 13, 2023
@spadapet spadapet requested a review from a team as a code owner September 13, 2023 20:40
@spadapet spadapet requested a review from rmarinho September 13, 2023 20:40
@samhouts samhouts added this to the Under Consideration milestone Sep 13, 2023
@spadapet spadapet enabled auto-merge (squash) September 13, 2023 22:12
@Eilon Eilon added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Sep 14, 2023
@spadapet
Copy link
Copy Markdown
Contributor Author

Ping @PureWeen for review

@spadapet spadapet requested a review from PureWeen September 20, 2023 17:59
@spadapet spadapet merged commit d54b778 into main Sep 20, 2023
@spadapet spadapet deleted the dev/peterspa/NavBarIsVisibleChanges branch September 20, 2023 21:49
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
@samhouts samhouts removed this from the Under Consideration milestone Jul 1, 2024
@samhouts samhouts added the fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shell.NavBarIsVisible does not update on hot reload on Android 8

4 participants