microsoft / microsoft/microsoft-ui-xaml

Window.ExtendsContentIntoTitleBar can't be set in XAML

Open
#10,365 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

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
Image

THIS WORKS

Image

Steps to reproduce the bug
  1. Create a new project
  2. Open MainWindow.xaml
  3. Set ExtendsContentTitleBar="True" in the Window object
  4. Press F5
  5. Error is thrown and does not compile.

Workaround

  1. Open MainWindow.xaml.cs
  2. Set ExtendsContentIntoTitleBar in the contructor.
  3. 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.

Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.