WPF - Putting a window into fullscreen severely degrades performance
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: **3.1.302**
* Windows version: **Windows 10**
* Does the bug reproduce also in WPF for .NET Framework 4.8?: **I do not know**
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? **No**
* Security issues and bugs should be reported privately, learn more via our [responsible disclosure guidelines](https://github.com/dotnet/wpf/blob/master/README.md#reporting-security-issues-and-security-bugs).
**Problem description:**
I am building a .NET Framework 4.7.2 application. This is an issue I've noticed for several years though, so going back a few versions.
Essentially, I put a window into "fullscreen" mode by setting **WindowStyle=None** and **WindowState=Maximized** and **Topmost**=**True**. I do not know of another way to do that. Being in fullscreen results in a moderate loss of performance.
In my case, specifically, I have images on a canvas, and I am zooming (via mouse wheel) and dragging them around. I notice when my app is in fullscreen the dragging can lag severely, and the zooming chunks very heavily.
**Actual behavior:**
Fullscreen reduces performance.
**Expected behavior:**
Fullscreen does not reduce performance. In fact, historically with DirectX applications, performance is increased.
**Minimal repro:**
* Create a wpf application
* Build it to do something slightly resource-intensive, (in my case I have an application that is moving images around on a canvas w/ zoom, etc.)
* Run application (in my case I have tried running Release x86 & Release x64 to the same effect)
* Perform the resource-intense operation (in my case dragging image around on cavnas + zoom w/ mouse wheel) - noticing that it works smoothly
* Put it into fullscreen via WindowStyle=None & WindowState=Maximized & Topmost=True
* Re-perform the resource-intense operation, notice it does not work smoothly
Contributor guide
Assessment
This issue has not been assessed yet.