'Popup windows become blurred on Windows 11

When I open a popup window using window.Show() on Windows 11 on a touch device, the popup window sometimes becomes blurry. There are two different scenarios, both shown in this video.

The issues can be simulated by adding the following code to two buttons:

    private void OpenWindow_Click(object sender, RoutedEventArgs e)
    {
        var window = new MainWindow();
        window.Owner = this;
        window.Show();
    }

    private void OpenTopmostWindow_Click(object sender, RoutedEventArgs e)
    {
        var window = new MainWindow();
        window.Owner = this;
        window.Topmost = true;
        window.Show();
    }

Issue 1

  1. Tap the Open Window button
  2. Doubletap the corner of the screen until a gray border appears and remains visible
  3. Minimize the main window. The popup window remains visible on the desktop as a blurred window

Issue 2

  1. Tap the Open Topmost Window button
  2. Doubletap the corner of the screen until a gray border appears and remains visible and tap it again
  3. The popup window becomes blurred and its content is no longer visible

I have already tried changing Windows 11 transparency, performance options, scaling, ... but none seem to fix the issue. I've also found similar issues here, here and here.

Does anyone have a solution to fix these issues, either in WPF or in Windows 11?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source