microsoft / microsoft/microsoft-ui-xaml
Issue with ExtendsContentIntoTitleBar on Multi-Screen Setup with Different Scaling (Maximized State)
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug

I'm trying to create a custom window following Microsoft's example [here](https://learn.microsoft.com/en-us/windows/apps/develop/title-bar#full-customization-example). Everything works fine when using a single screen or multiple screens with the same scaling.
However, when I have one screen set to 250% scaling (4K) and another at 100% scaling, a large white border appears at the top of the window when maximized on the screen with the lower scaling.
I noticed the same issue in the WinUI Gallery App, which behaves similarly on my second screen, just like my own implementation. This suggests that it's not an issue with my code but rather a general problem.
Has anyone encountered this before? Is there a known workaround or fix for this behavior?
Thanks in advance! 😊
### Steps to reproduce the bug
Open WinUI Gallery on different screens with different scaling.
or
Follow the simple example from Microsoft [here](https://learn.microsoft.com/en-us/windows/apps/develop/title-bar#full-customization-example)
### Expected behavior
Full screen without any white border on all screens
### Screenshots

### NuGet package version
WinUI 3 - Windows App SDK 1.6.5: 1.6.250205002
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
_No response_
Contributor guide
Research direction
Start by reproducing the issue in WinUI Gallery on monitors using 250% and 100% scaling, then compare it with Microsoft's full customization example for ExtendsContentIntoTitleBar. Verify the maximized window behavior on each screen; done means the white border is absent when moving the window between differently scaled displays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100