Repository navigation
Conversation
GetAppearanceForPivot walks up from the pivot's presented page to collect the Shell appearance values. IShellSectionController.PresentedPage returns the top modal page when a modal is open, and modal pages are parented to the Window, not the Shell, so the walk found nothing and the toolbar fell back to the default dark color. That's why pushing a modal page at startup left the Shell with the wrong theme on Android and Windows. WalkToPage now uses the top page of the ShellSection's own navigation stack, which is what PresentedPage returns when no modal is open. Fixes dotnet#18409
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39902Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39902" |
|
Hey there @@MykhailoDav! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
This comment has been minimized.
This comment has been minimized.
|
Hey there @MykhailoDav! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Expert Review — 0 findings
Reviewed commit cf456b9.
PR Test Gate
🧪 Gate analysis — click to expand✅ Passed. The selected verification satisfied the gate's passing conditions. Unmatched, skipped, or inconclusive groups are not passing evidence. 🧪 Unit tests
Execution log excerptsWithout fix With fix PR head: cf456b93. Without-fix baseline: 2f3276c3. |
This comment has been minimized.
This comment has been minimized.
daa01a9
into
dotnet:candidate/11.0.1xx-sr2
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes #18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as #39902 (#18409), copied byte for byte from its merge commit daa01a9. #39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has #39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes #40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
### Description of Change When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved `ShellAppearance`). **Root cause** `GetAppearanceForPivot` walks up from the pivot's presented page to collect the `Shell.*` appearance values. For a `ShellSection` pivot, `WalkToPage` used `IShellSectionController.PresentedPage`, which returns the top modal page while a modal is open. Modal pages are parented to the `Window`, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors. **Fix** `WalkToPage` now resolves the `ShellSection` to the top page of its own navigation stack — exactly what `PresentedPage` returns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top. **Tests** `ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen`: sets `Shell.BackgroundColor`, pushes a modal page, then registers an appearance observer for the current section. | | Without fix | With fix | |---|---|---| | `main` (2f3276c) | Fails: the observer gets a null appearance | Passes; Controls.Core.UnitTests 6734 passed (the one failure is a pre-existing decimal-separator locale test that fails on `main` on this machine too) | ### Issues Fixed Fixes dotnet#18409 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…dal page is open (dotnet#40333) ### Description of Change On Android, if the app theme changes while a modal page is open over a Shell, the Shell navigation bar falls back to the default colors (`#2C3E50` in light, `#1B3147` in dark). It stays that way after the modal is closed, even when `Shell.BackgroundColor` uses an `AppThemeBinding`. `Shell.OnRequestedThemeChanged` calls `AppearanceChanged(CurrentPage, false)`. While a modal is open, `CurrentPage` is the modal page. Modal pages are parented to the Window, so `GetAppearanceForPivot` walks up from the modal, never reaches the Shell and returns null. `UpdateToolbarAppearanceFeatures` then writes the default colors into `Shell.Toolbar`. `Application` raises `RequestedThemeChanged` after the `AppThemeBinding` values have already updated, so these defaults are the last thing written. Nothing recalculates the appearance when the modal is popped. The fix has two parts in `Shell.cs`: 1. `OnRequestedThemeChanged` passes `GetCurrentShellPage()` instead of `CurrentPage`. That helper already exists for "the visible page without the modal stack", and `GetEffectiveValue` uses it. Without a modal both return the same page, so only the modal case changes. 2. `WalkToPage` for a `ShellSection` uses the top page of the section's own stack instead of `PresentedPage`. This hunk is the same change as dotnet#39902 (dotnet#18409), copied byte for byte from its merge commit daa01a9. dotnet#39902 is merged into `candidate/11.0.1xx-sr2` but isn't on `net11` yet. With only the first change, the theme change reaches Android's `ShellSectionHandler` observer, whose pivot is the section, and `WalkToPage` sends it to the modal again, so the defaults come back. If this PR is retargeted to a branch that already has dotnet#39902, that hunk is identical to what's there and only the one-line change is new. ### Tests `ShellAppearanceTests.ThemeChangeWhileAModalPageIsOpenKeepsTheToolbarAppearance` (Controls.Core.UnitTests) sets an `AppThemeBinding` background (Red/Blue) on a Shell, adds an observer on the ShellSection the way Android's `ShellSectionHandler` does, pushes a modal and switches `UserAppTheme` to Dark. It checks that `Shell.Toolbar.BarBackground` and the observer's appearance are both Blue. | `Shell.cs` | Result | |---|---| | without the fix | fails: `Expected: [Color: Red=0, Green=0, Blue=1, Alpha=1] Actual: null` | | only the `OnRequestedThemeChanged` change | fails, same message | | only the `WalkToPage` change | fails, same message | | both | passes | Controls.Core.UnitTests with the fix: 6734 passed, 1 failed, 30 skipped. The failure is `TwoWayBindingToNullableDoublePropertyWithEmptyStringBecomesNull`, which also fails on clean `net11` on my machine because of a decimal-comma locale. Shell tests (`FullyQualifiedName~Shell`): 565 of 565 passed. **Before / after** (sandbox app, Android emulator API 37): the bar is red in the light theme and blue with a yellow title in the dark theme. Each clip opens a modal, switches the emulator to dark mode with `adb shell cmd uimode night yes` and closes the modal. | Before: after closing the modal the bar is the default `#1B3147` | After: the bar is blue with the yellow title | |---|---| |  |  | Full clips: [before.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-before.mp4) · [after.mp4](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after.mp4). There's also a [clip with only the first change](https://raw.githubusercontent.com/MykhailoDav/maui/media-pr-2026-11-12/40240-after-oneliner-only.mp4), where the bar still ends up `#1B3147`. I only recorded the light-to-dark direction, with Material 3 off (the default). iOS and Windows go through the same `Shell.cs` code, but I didn't run them. ### Issues Fixed Fixes dotnet#40240 Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Description of Change
When a modal page is pushed at startup, the Shell toolbar gets the default dark color instead of the colors set on the Shell, and stays wrong after the modal closes (on Android and Windows, which drive the toolbar from the resolved
ShellAppearance).Root cause
GetAppearanceForPivotwalks up from the pivot's presented page to collect theShell.*appearance values. For aShellSectionpivot,WalkToPageusedIShellSectionController.PresentedPage, which returns the top modal page while a modal is open. Modal pages are parented to theWindow, not the Shell, so the walk immediately left the Shell tree, found nothing and returned null — and the toolbar fell back to the default colors.Fix
WalkToPagenow resolves theShellSectionto the top page of its own navigation stack — exactly whatPresentedPagereturns when no modal is open — so appearance resolution gives the same result whether or not a modal is sitting on top.Tests
ShellAppearanceTests.AppearanceIsResolvedWhileAModalPageIsOpen: setsShell.BackgroundColor, pushes a modal page, then registers an appearance observer for the current section.main(2f3276c)mainon this machine too)Issues Fixed
Fixes #18409