microsoft / microsoft/microsoft-ui-xaml
Cannot center something in the titlebar?
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
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
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
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