.NET Core Version: .Net Core 3.1 (also emulating x86 on ARM machines)
Windows version: 19041.1.arm64fre.vb_release.191206-1406 (also repros on non ARM build versions of 20H2)
Does the bug reproduce also in WPF for .NET Framework 4.8?: Not sure as the repro is super inconsistent.
Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the issue via the instructions here.
Problem description:WPF WindowChrome Rendering Issue
Content: We are implementing a custom titlebar using Window Chrome. The titlebar has UI controls and some XAML elements (back button, text box, toggle button, caption buttons). There is an issue where sometimes the WindowChrome titlebar does not correctly render.
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.
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.
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).
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.
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.
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
Security issues and bugs should be reported privately, learn more via our responsible disclosure guidelines.
Problem description: WPF WindowChrome Rendering Issue Content: We are implementing a custom titlebar using Window Chrome. The titlebar has UI controls and some XAML elements (back button, text box, toggle button, caption buttons). There is an issue where sometimes the WindowChrome titlebar does not correctly render.
Actual behavior: Video available at: https://1drv.ms/v/s!AtCv9_WVsvyQhRPZEgllXx_tcVnM?e=xroU1r
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.
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.
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).
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.