-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Force Light theme makes certain controls not change colour #10490
Comments
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. |
What helped me: Put [Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
} found the info on that here: https://stackoverflow.com/questions/69115751/how-to-use-only-light-mode-in-aplication-android-studio |
Verified this issue with Visual Studio 17.7.0 Preview 1.0. Can repro on windows platform with sample project. |
I'm also facing this issue. |
Tl:dr:
I noticed (as others in this thread) that on Windows:
So I checked code and when I change the theme in the Windows settings dialog window, then I can see
So I thought that perhaps ... but it crashes. It crashes by design because WinUI's
So this is not good. There is also an open issue microsoft/microsoft-ui-xaml#4474 to allow changing The only thing that is supported now is:
But honestly you would have to traverse your app's elements and change them one at a time ... sounds slow and error prone. I hope this is an accurate report with regarding to changing app theme at runtime for the Windows platform. If you can spot an error, please let me know. |
Thanks @MartyIX !! It looks like this issue has workarounds and dependencies. We'll continue working with the Windows team on this one. |
For Windows, one can use this workaround: microsoft/microsoft-ui-xaml#4474 (comment). However, its use is quite limited because it works only on visible elements. Any help in improving it is welcome. |
I just wrote a comment here #21042 (comment) which feels relevant for this issue as well (for WinUI, that is). It's a workaround but for some people it might be "good enough". |
Description
Picker has a hover of white text when forcing the light theme.
I've set the background so you can see the text colour.
Loaded page up, selected "This" from the picker:
If you hover over the item it'll turn white:
Since the light theme has a white background you can't read the text.
Steps to Reproduce
Current.UserAppTheme = AppTheme.Light;
BackgroundColor="Green"
on the ContentPageLink to public reproduction project repository
https://github.com/Spinks90/MauiLightBug
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
maui-windows 6.0.536/6.0.400
Did you find any workaround?
No response
Relevant log output
No response
Depends on
The text was updated successfully, but these errors were encountered: