microsoft / microsoft/microsoft-ui-xaml

Cannot center something in the titlebar?

Open
#11,221 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

I just want to put a search input in the middle of the titlebar, but it seems that content and rightheader are always taking up around half the area, so I can't put anything truly in the center

You can see this in the winui3 component demo, the search is not centered, instead its on the left

```



Stretch





















```

### Why is this important?

Its looks funny not having it centered

### Steps to reproduce the bug

See description

### Actual behavior

_No response_

### Expected behavior

_No response_

### Screenshots

_No response_

### NuGet package version

Latest

### Windows version

_No response_

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

Start with the WinUI 3 component demo and the TitleBar configuration shown in the issue, focusing on how Content and RightHeader divide the available width. Confirm the behavior with the search input example, then make the titlebar support genuinely centered content and verify that the search control is centered.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.