lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.72k stars 756 forks source link

White flickering when resizing FluentWindow #1205

Open 4Ripz opened 3 months ago

4Ripz commented 3 months ago

Describe the bug

The FluentWindow exhibits a white flickering during window resizing, which only occurs with FluentWindow a standard WPF Window works fine. On Windows 10, the flickering is consistently visible when resizing the window. However, on Windows 11, the issue only becomes visible if the WindowBackdropType is removed, otherwise, the flickering is not visible. A user in issue #482 encountered a similar problem and found a workaround. By setting the WindowChrome GlassFrameThickness to 0, the flickering disappears. However, this fix introduces a new issue the focus doesn't work and it makes the backdrop stuck. For example in Windows 11 when starting the app and WindowBackdropType="Mica" and you are focused on the app the backdrop will be stuck on Mica effect even if you switch the focus to another app also in Windows 10, the same but with the shadow effect.

To Reproduce

add FluentWindow and resize on Windows 10 and with Windows 11 don't add WindowBackdropType and resize

Expected behavior

No flickering when resizing the Window

Screenshots

Issue

OS version

Windows 11 Pro Build 22631 & Windows 10 Pro Build 19045

.NET version

Framework 4.7.1

WPF-UI NuGet version

WPF-UI 3.0.5

Additional context

No response