dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.08k stars 1.17k forks source link

WPF WindowChrome Rendering Issue #3675

Open davidbangMicrosoft opened 4 years ago

davidbangMicrosoft commented 4 years ago

Notice that the titlebar looks blank on the small spawned window. Then as the user hovers over the titlebar, the elements become visible as the user hovers over them.

Expected behavior: See attached screenshot. Notice that the titlebar content renders fine.

ExpectedResult

Minimal repro: It seems to be a weird race condition in the rendering by the OS. There is no definite repro. It sometimes repros when going through the 2 scenarios below.

  1. Go to Window Start -> Launch Your Phone. Go to Apps Node in Your Phone. Open any app (please message me at dabang@microsoft.com before testing so I can get you the right configurations to test).

  2. Another possible test is https://engy.us/blog/2020/01/01/implementing-a-custom-window-title-bar-in-wpf/ copy and base the window chrome titlebar implementation from here. Copy and paste this into a basic WPF window styling (message me at dabang@microsoft.com if you need help setting up). Test the rendering and see if titlebar elements render correctly.

ClosetBugSlayer commented 4 years ago

3193 I think these are related, I don't think WindowChrome is making the right assumptions about how and when system title bars are drawn, or how to correctly disable them.

davidbangMicrosoft commented 4 years ago

Judging by how, moving or resizing the window seems to fix the rendering, I think you're correct in saying it is a similar bug to #3193 . @ClosetBugSlayer