When Windows HDR is enabled, semi-transparent controls rendered using WinUI exhibit incorrect transparency. However, when using Win+Shift+S to take a screenshot, the preview image shows the correct transparency. This issue is particularly noticeable in WinUI windows with a dark theme and when utilizing System Backdrop, and I believe it is related to the Alpha blending in WinUI.
Steps to reproduce the bug
Connect to a display that supports HDR.
Enable HDR on Windows.
Open a custom-built test window or existing WinUI 2/3 applications (such as Windows Settings, Notepad, Win11 File Explorer, WinUI 3 Gallery).
Observe the semi-transparent elements (e.g., TabView in Notepad) overlaid on the System Backdrop (preferably MicaAlt for better visibility).
Take a screenshot preview using Win+Shift+S or toggle HDR on and off to observe the changes in transparency of the semi-transparent elements (they become less transparent in HDR mode).
Expected behavior
No response
Screenshots
The left side shows the effect with HDR enabled, while the right side shows the effect with HDR disabled or after capturing a screenshot using PrtSc (since Snipping Tool is not a WYSIWYG in this scenario, I have juxtaposed the results of PrtSc with the window and captured the screenshot using the ScreenCapture API).
Describe the bug
When Windows HDR is enabled, semi-transparent controls rendered using WinUI exhibit incorrect transparency. However, when using Win+Shift+S to take a screenshot, the preview image shows the correct transparency. This issue is particularly noticeable in WinUI windows with a dark theme and when utilizing System Backdrop, and I believe it is related to the Alpha blending in WinUI.
Steps to reproduce the bug
Expected behavior
No response
Screenshots
The left side shows the effect with HDR enabled, while the right side shows the effect with HDR disabled or after capturing a screenshot using PrtSc (since Snipping Tool is not a WYSIWYG in this scenario, I have juxtaposed the results of PrtSc with the window and captured the screenshot using the ScreenCapture API).
NuGet package version
WinUI 3 - Windows App SDK 1.3.2: 1.3.230602002
Windows version
Windows 11 (22H2): Build 22621
Additional context
Version: WinUI 2.7 - WASDK 1.3.2