You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apps in dark mode on Windows (UWP dark mode or Win32 apps that set DWMWA_USE_IMMERSIVE_DARK_MODE) get a larger shadow, which makes them more visible, as the shadow is harder to see in dark mode otherwise. WinUI 3 does not use this larger shadow in dark mode, so they have worse contrast when glancing at open windows.
Steps to reproduce the bug
Compare the shadows of a UWP app when the light/dark mode settings are changed in Windows Settings and observe that the shadow grows in dark mode.
Then, look at a WinUI 3 app and observe that the shadow stays the same.
Note: This all assumes that Window.ExtendsContentIntoTitleBar was not set to true. Setting that to true turns immersive dark mode on, even if the app is in light mode. That results in a shadow that is too dark for light mode. See #8377.
Expected behavior
In dark mode, the shadow should be bigger/darker.
Screenshots
It’s a little hard to see, but UWP/immersive in dark mode has a bolder, darker shadow than in light mode. WinUI 3 should use that darker shadow when dark mode is on.
NuGet package version
WinUI 3 - Windows App SDK 1.2.5: 1.2.230313.1
Windows version
Windows 11 (22H2): Build 22621
Additional context
This could be implemented by setting DWMWA_USE_IMMERSIVE_DARK_MODE to true when the WinUI 3 app is in dark mode.
A workaround for this problem exists and is rather easy:
Simply call DwmSetWindowAttribute(WindowNative.GetWindowHandle(this), DWMWA_USE_IMMERSIVE_DARK_MODE, ...) with true or false as the value depending on whether your app is in dark or light mode. Make sure to update it when theme changes occur.
The text was updated successfully, but these errors were encountered:
Describe the bug
Apps in dark mode on Windows (UWP dark mode or Win32 apps that set DWMWA_USE_IMMERSIVE_DARK_MODE) get a larger shadow, which makes them more visible, as the shadow is harder to see in dark mode otherwise. WinUI 3 does not use this larger shadow in dark mode, so they have worse contrast when glancing at open windows.
Steps to reproduce the bug
Compare the shadows of a UWP app when the light/dark mode settings are changed in Windows Settings and observe that the shadow grows in dark mode.
Then, look at a WinUI 3 app and observe that the shadow stays the same.
Note: This all assumes that
Window.ExtendsContentIntoTitleBar
was not set to true. Setting that to true turns immersive dark mode on, even if the app is in light mode. That results in a shadow that is too dark for light mode. See #8377.Expected behavior
In dark mode, the shadow should be bigger/darker.
Screenshots
It’s a little hard to see, but UWP/immersive in dark mode has a bolder, darker shadow than in light mode. WinUI 3 should use that darker shadow when dark mode is on.
NuGet package version
WinUI 3 - Windows App SDK 1.2.5: 1.2.230313.1
Windows version
Windows 11 (22H2): Build 22621
Additional context
This could be implemented by setting DWMWA_USE_IMMERSIVE_DARK_MODE to true when the WinUI 3 app is in dark mode.
A workaround for this problem exists and is rather easy:
Simply call
DwmSetWindowAttribute(WindowNative.GetWindowHandle(this), DWMWA_USE_IMMERSIVE_DARK_MODE, ...)
with true or false as the value depending on whether your app is in dark or light mode. Make sure to update it when theme changes occur.The text was updated successfully, but these errors were encountered: