Loss of blurry background of windows on resizing with SetWindowCompositionAttribute and windows 10 v2004 in WPF
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
Hello,
In a WPF program, I used a blurry background for my windows.
I created this blur using the SetWindowCompositionAttribute API.
This effect worked very well
The version of the Framework used is 4.7. 2.
Since updating Windows 10 to version 2004, I have seen issues with losing the blur effect when resizing windows size.
This loss of the blur effect is visible when my display is in extended mode (2 monitors).
For the single display mode (1 single monitor), there is no loss of the blur effect when resizing the windows.
This loss of blur is also visible after resizing a window and when I start clicking with the mouse on the desktop and on the windows (loss of the random blur effect) and whatever the single display mode or extended.
You need at least 2 windows displayed with the blur effect on the same monitor to see these problems.
I also had to move the SetWindowCompositionAttribute API call from the 'Initialized' event to the 'Load' event of the window to have a blurry effect when opening the window.
I used Framework 4.8 and core 3.1 in C #, it doesn't change anything.
In my testing with the SetWindowCompositionAttribute API, I tried using acrylic blur (ACCENT_ENABLE_ACRYLICBLURBEHIND and GradienColor).
The effect on the window is perfect.
The acrylic blur does not disappear when resizing the window.
But there is an important problem, the movement of the window on the desktop is very slow.
I have attached a zip file in which you can see these problems on the 3 videos and test using the program.
[BLURBEHIND.zip](https://github.com/dotnet/wpf/files/5397231/BLURBEHIND.zip)

Contributor guide
Assessment
This issue has not been assessed yet.