[Enhancement] Added support for customizing the window title with configurable font attributes#31820
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new TitleFontAttributes property to the TitleBar control that allows developers to customize the font style (Bold, Italic, None) of the window title text, with Bold as the default value to enhance app title visibility.
- Added
TitleFontAttributesproperty to TitleBar with FontAttributes.Bold as default - Updated TitleBar template to bind the new property to the title label
- Added comprehensive UI tests to verify the font attributes functionality
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Controls/src/Core/TitleBar/TitleBar.cs | Added TitleFontAttributes property with Bold default and binding to title label |
| src/Controls/tests/TestCases.HostApp/Issues/Issue24627.cs | Created test page to demonstrate title font attributes with toggle functionality |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24627.cs | Added UI tests to verify Bold default and None toggle behavior |
| src/Controls/src/Core/PublicAPI/**/PublicAPI.Unshipped.txt | Updated public API surface for all platforms to include new property |
22fb331 to
026f347
Compare
|
@jsuarezruiz, I have updated the test sample, and committed the images |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
3612317 to
f91e337
Compare
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 31820Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 31820" |
f91e337 to
8a3edc8
Compare
|
/rebase |
8a3edc8 to
186a9be
Compare
|
|
kubaflo
left a comment
There was a problem hiding this comment.
Could you please resolve conflicts?
186a9be to
1685ae6
Compare
@kubaflo, Conflicts have been resolved |
|
|
3 similar comments
|
|
|
|
|
|
1685ae6 to
787bf5d
Compare


Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Public API Changes
TitleFontAttributes(on TitleBar)FontAttributesNoneScreenshot
Windows-TitleBar.mp4
Mac-TitleBar.mov
Usage Example
Xaml:
C#:
Issues Fixed
Fixes #24627