DWM titlebar is rendered behind WinUI3 titlebar
See original GitHub issueDescribe the bug
When using a custom titlebar in a WinUI3 desktop program (C# or C++), the DWM native titlebar is still being rendered behind WinUI3’s content. (DwmExtendFrameIntoClientArea
is still being called).
Steps to reproduce the bug
Steps to reproduce the behavior:
- Create a new desktop project
- Add either just a call to
ExtendsContentIntoTitleBar(true);
in the constructor of the main window or add that and athis->SetTitleBar(TitleBar());
call. - Build, run, and resize the window to see
Expected behavior The native window frame should not be extended at all, or WinUI should use only the native window frame instead of drawing its own. Personally, I prefer to use the DWM frame, as WinUI controls can overlap everything except the caption buttons. If the caption buttons should have their colors changed, it seems like upcoming Windows 11 DWM apis can achieve that goal: https://github.com/microsoft/WindowsAppSDK/issues/41#issuecomment-892637002
On the other hand, the jittering when resize needs to really be fixed; platform api’s and UWP Core/AppWindows don’t have the same problem.
Version Info
NuGet package version: [WinUI 3 - Windows App SDK 0.8: 0.8.2]
Windows app type:
Win32 |
---|
YES |
Windows version | Saw the problem? |
---|---|
Insider Build (22000.160) | YES |
Device form factor | Saw the problem? |
---|---|
Desktop | YES |
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
closing it. feel free to re-open it something changes
@AzAgarampur yes actually. thanks for the patience. I have found the issue and the fix and it will be released in a future release.