microsoft / microsoft/microsoft-ui-xaml
Window.ExtendsContentIntoTitleBar can't be set in XAML
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
Describe the bug
The Window class in WinUI 3 has a ExtendsContentIntoTitleBar property. However, it's not usable and requires a developer to set this in code-behind.
When set in XAML, the project does not compile throwing the following error: The XAML Binary Format (XBF) generator reported syntax error '0x09C4' : Property Not Found
THIS DOES NOT WORK
THIS WORKS
Steps to reproduce the bug
- Create a new project
- Open
MainWindow.xaml - Set
ExtendsContentTitleBar="True"in the Window object - Press F5
- Error is thrown and does not compile.
Workaround
- Open
MainWindow.xaml.cs - Set
ExtendsContentIntoTitleBarin the contructor. - Press F5
Expected behavior
This should just work in XAML as it's shown by IntelliSense and it's a property that can be set in code-behind.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.7 Preview 1: 1.7.250208002-preview1
Windows version
Windows 11 (24H2): Build 26100
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in MainWindow.xaml using the reported Windows App SDK version, then compare it with the workaround in MainWindow.xaml.cs. Check the XAML build error and property resolution; done means the property can be set in XAML and the project compiles successfully.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100