dotnet / dotnet/wpf

WPF window stops rendering when using a BitmapCache inside while another window is invisible

Open
#2,158 10 comments 6 reactions 1 assignee Claimed by @vatsan-madhavan View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: 3.0
* Windows version: Windows 7/8/8.1/10 (Any Windows 10 versions including 10.0.18362.329)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes



**Problem description:**
If a `Window` contains any `UIElement` with a `BitmapCache` and another window is hidden, the first `Window` will stop rendering in two different situations:
1. Lock and unlock the screen
1. Wait for a while (e.g. 10~30min)

**Actual behavior:**

See this animation below and you'll see that the window stops rendering after a locking and unlocking screen.

![BitmapCache](https://user-images.githubusercontent.com/9959623/68171041-21065900-ffad-11e9-8e5e-8ca75c521cc3.gif)

**Expected behavior:**

The window should keep rendering.

**Minimal repro:**

1. Make a window shown with a BitmapCache inside
1. Show and hide another window
1. Lock and unlock the screen
1. Resize the first window to view the behavior

See this minimal reproduction repository below:

- [wpf-issues/BitmapCache at master · dotnet-campus/wpf-issues](https://github.com/dotnet-campus/wpf-issues/tree/master/BitmapCache)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.