-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[.NET10] [Enhancement] Display Window Title in bold by default with configurable font attributes #31820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: net10.0
Are you sure you want to change the base?
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22fb331 to
026f347
Compare
…milarasan-Paranthaman/maui into TitleBar-Title-FontAttributes
|
@jsuarezruiz, I have updated the test sample, and committed the images |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| public static readonly BindableProperty ForegroundColorProperty = BindableProperty.Create(nameof(ForegroundColor), | ||
| typeof(Color), typeof(TitleBar)); | ||
|
|
||
| /// <summary>Bindable property for <see cref="TitleFontAttributes"/>.</summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use bold by default? Using None maintain backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I have changed the default value to FontAttributes.None to maintain backward compatibility.
|
/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). |


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)FontAttributesBoldScreenshot
Windows-TitleBar.mp4
Mac-TitleBar.mov
Usage Example
Xaml:
C#:
Issues Fixed
Fixes #24627