TitleBar Title does not respect FontSize property
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Setting the FontFamily, FontSize and FontWeight properties of the TitleBar has no effect on the Title displayed.
To Reproduce
<ui:FluentWindow ...>
<ui:TitleBar FontFamily="Times New Roman" FontWeight="Bold" FontSize="24" Title="Window title"/>
</ui:FluentWindow>
Expected behavior
The Title displayed would reflect the FontFamily, FontSize and FontWeight properties set on the TitleBar.
Screenshots
No response
OS version
Win 11
.NET version
Net 8.0
WPF-UI NuGet version
3.0.0
Additional context
Before Version 3.0 I could get round this limitation by defining my own content in TitleBar.Header. Now anything put in the TitleBar.Header appears aligned to the very right of the window, so this no longer works. TitleBar cannot be simply retemplated to do the right thing because TitleBarButton, a required component of the TitleBar, has (unnecessarily?) "internal" scope and cannot therefore be used in a style in my project.
Thanks for your work on the project.
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 by tracing the TitleBar control and its template, focusing on how the displayed Title receives FontFamily, FontSize, and FontWeight. Reproduce the issue with the WPF-UI 3.0.0 example from the report, then verify that the displayed title reflects those properties without breaking TitleBar.Header alignment or required TitleBarButton behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100