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

[regression/7.0.0] Application.Current.RequestedThemeChanged event only raises once #8236

Closed
HobDev opened this issue Jun 22, 2022 · 9 comments · Fixed by #11200
Closed

[regression/7.0.0] Application.Current.RequestedThemeChanged event only raises once #8236

HobDev opened this issue Jun 22, 2022 · 9 comments · Fixed by #11200
Assignees
Labels
area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events area-theme Themes, theming fixed-in-7.0.81 Look for this fix in 7.0.81! fixed-in-7.0.92 Look for this fix in 7.0.92! fixed-in-7.0.100 fixed-in-7.0.101 fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@HobDev
Copy link

HobDev commented Jun 22, 2022

Description

Application.Current.RequestedThemeChanged event only raise on first change. It does not get called after second change and subsequent changes. I wrote the UI in C# and want to change the Resource dictionary according to the selected theme.

Steps to Reproduce

Run the repro project and put break point at line 11 Current_RequestedThemeChanged method of App.xaml.cs. The event will fire on first change of mode and but did not afterwards.
MauiApp1.zip

Version with bug

6.0.400 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

@HobDev HobDev added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Jun 22, 2022
@PureWeen PureWeen added area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events platform/android 🤖 and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Jun 22, 2022
@kristinx0211 kristinx0211 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 23, 2022
@kristinx0211
Copy link

verified repro on android using above project.

@ghost
Copy link

ghost commented Aug 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mattleibow
Copy link
Member

Is this a duplicate of #10310

@DanTravison
Copy link

This is not limited to AppThemeBinding, I'm use the DynamicResource model and have the same issue except I never see the RequestedThemeChangedEvent.

If anyone else is see this, I've put together a workaround at https://github.com/DanTravison/ThemeSelector.

@mattleibow mattleibow added the i/regression This issue described a confirmed regression on a currently supported version label Mar 7, 2023
@mattleibow mattleibow moved this from Todo to In Progress in MAUI SDK Ongoing Mar 7, 2023
@mattleibow mattleibow assigned mattleibow and unassigned jsuarezruiz Mar 8, 2023
@mattleibow mattleibow added the area-theme Themes, theming label Mar 8, 2023
@scriptBoris
Copy link

Any news?

@mattleibow
Copy link
Member

This will be fixed in #11200

@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Mar 14, 2023
@HobDev
Copy link
Author

HobDev commented Mar 14, 2023

@mattleibow when this will be available on stable channel

@scriptBoris
Copy link

scriptBoris commented Mar 14, 2023

@mattleibow Yes, and how to update MAUI to the version where this fix will be fixed? If in Xamarin.Forms it was necessary to update nuget packages, but in MAUI???

@BlyZeDev
Copy link

BlyZeDev commented Apr 1, 2023

How to Update the .NET 7 MAUI to the newest Release?

@samhouts samhouts added fixed-in-7.0.81 Look for this fix in 7.0.81! fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! labels Apr 12, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2023
@samhouts samhouts added the fixed-in-7.0.92 Look for this fix in 7.0.92! label Jul 11, 2023
@samhouts samhouts changed the title Application.Current.RequestedThemeChanged event only raises once [regression/7.0.0] Application.Current.RequestedThemeChanged event only raises once Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core-lifecycle XPlat and Native UIApplicationDelegate/Activity/Window lifecycle events area-theme Themes, theming fixed-in-7.0.81 Look for this fix in 7.0.81! fixed-in-7.0.92 Look for this fix in 7.0.92! fixed-in-7.0.100 fixed-in-7.0.101 fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! i/regression This issue described a confirmed regression on a currently supported version platform/android 🤖 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.