-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
App crashes when high contrast mode is enabled in Windows in .NET 9 with fluent themes enabled #10043
Comments
Still happens in .NET 9 😬. Honestly not sure how it got released in this state... |
@aquinn39, it got messed up in one of the last minute fixes that I was doing, I have prepared a fix for it and will push it ASAP. |
@dipeshmsft Ahh okay, will the fix come out soon or does it need to wait for the next .NET 9 patch? |
@aquinn39 I am not sure about this right now, I will take a look at it get back to you. |
@aquinn39, this fix will come out in Jan'25. |
Hi @dipeshmsft , Around which day will the fix come? .NET Patch Tuesday? |
@jaimecbernardo @aquinn39, the new 9.0.1 SDK released has the fix for this issue. I am going ahead and closing this now. |
Description
When enabling fluent themes in WPF in .NET 9 and high contrast mode is on in Windows, or fluent themes are already enabled and then high contrast mode is enabled, the app will crash with a System.Windows.Markup.XamlParseException. The full exception is:
Reproduction Steps
Expected behavior
The app should not crash.
Actual behavior
The app crashes.
Regression?
Yes, not an issue with the old themes and older versions of .NET nor .NET Framework.
Known Workarounds
Enable the fluent themes using the Application.ThemeMode property within a try catch. App will still crash once the themes are enabled and the user turns on high contrast mode, but not if it was already on.
Impact
WPF cannot be used with the fluent themes while high contrast mode is enabled on the system.
Configuration
.NET 9, AnyCPU, Windows 11 build 22631.4037.
Other information
No response
The text was updated successfully, but these errors were encountered: