microsoft / microsoft/microsoft-ui-xaml

Issue with ExtendsContentIntoTitleBar on Multi-Screen Setup with Different Scaling (Maximized State)

Open
#10,371 0 comments 1 reaction 0 assignees View on GitHub
area-TitleBar bug team-Core
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

![Image](https://github.com/user-attachments/assets/07781c78-283b-4987-a6f9-db75a5c3c601)

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

![Image](https://github.com/user-attachments/assets/df7b13db-57b4-4b52-83cf-eab6eef6c618)

### 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.