WPF rendering issue on any machine

Andrey Nasonov 21 Reputation points
2021-03-01T02:00:48.117+00:00

Please follow this steps to catch problem on your machine. Please, help me resolve it.

  1. Create empty WPF project.
  2. Use property CacheMode="BitmapCache" in MainWindow's Grid;
  3. Show MainWindow on start application, then hide it. Show new any Window, for example new MainWindow. You can use a code below.
  4. Press Ctrl + Alt + Del or Win + L and try to interact with showed window (resize, minimize) it should be broken now. var window1 = new MainWindow();
    window1.Show();
    await Task.Delay(1000);
    window1.Hide();
    var window2 = new MainWindow();
    window2.Show();

Tested on Windows 10, different video cards and PCs. On each PC the issue exist.

I've project where you can try to get the same issue: https://github.com/Erapchu/GhostWindows

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,676 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
767 questions
{count} votes