Skip to content
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

Icons in Shell TabBar and AppBar are no longer updated after changing the UserAppTheme #20243

Closed
davidschachtschabel opened this issue Jan 30, 2024 · 1 comment · Fixed by #24688
Labels
area-theme Themes, theming fixed-in-9.0.0-rc.2.24503.2 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@davidschachtschabel
Copy link

Description

I have built an app with theme switching by user interaction with a button. When the user clicks the button, the UserAppTheme is set to AppTheme.Light or AppTheme.Dark based on the current theme at app start. To change the color of my icons, I used the AppThemeBinding XAML markup extension and set "Light" to black and "Dark" to white.

If the app is in the light theme and the user switches to the dark theme, the icons will be black instead of white. If the user first navigates to another page, performs a theme switch, and navigates back to the main page, you can see that the icon in the app bar will change to the right color defined in AppThemeBinding, but the icons in the shell tap bar won't change.

In this screenshot you can see the app theme at app start.
Bildschirmfoto 2024-01-30 um 12 36 14

This screenshot shows the state after a theme change on the main page:
Bildschirmfoto 2024-01-30 um 12 37 14

This screenshot shows the state after a theme switch with back navigation:
Bildschirmfoto 2024-01-30 um 12 37 47

Steps to Reproduce

Repo steps for the main page behavior:

  1. Click the "Change Theme" button on the main page.
  2. The theme will change, but the icons will not be white in dark theme or black in light theme.

Repo steps for the behavior with navigation:

  1. Click the icon in the application bar to navigate to another page.
  2. Change the theme by clicking the "Change Thememode" button
  3. Navigate back and you can see that only the icon in the application bar has the right color.

Link to public reproduction project repository

https://github.com/davidschachtschabel/UserAppThemeTest

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@davidschachtschabel davidschachtschabel added the t/bug Something isn't working label Jan 30, 2024
@rachelkang rachelkang added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Feb 13, 2024
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Mar 8, 2024
@XamlTest
Copy link

XamlTest commented Mar 8, 2024

Verified this on VS 17.10.0 Preview 1.0(8.0.7). Repro on iOS 17.2 and MacCatalyst, not repro on Windows 11 and Android 14.0-API34 with below Project:
UserAppThemeTest.zip

Windows:
image

Android:
Screenshot 2024-03-08 at 2 16 15 PM

iOS:
Screenshot 2024-03-08 at 2 18 27 PM
Mac:
Screenshot 2024-03-08 at 2 22 01 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-theme Themes, theming fixed-in-9.0.0-rc.2.24503.2 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants