Skip to content

[Enhancement] Added support for customizing the window title with configurable font attributes#31820

Open
Tamilarasan-Paranthaman wants to merge 6 commits intodotnet:net11.0from
Tamilarasan-Paranthaman:TitleBar-Title-FontAttributes
Open

[Enhancement] Added support for customizing the window title with configurable font attributes#31820
Tamilarasan-Paranthaman wants to merge 6 commits intodotnet:net11.0from
Tamilarasan-Paranthaman:TitleBar-Title-FontAttributes

Conversation

@Tamilarasan-Paranthaman
Copy link
Copy Markdown
Member

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman commented Sep 30, 2025

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

  • Implemented a new TitleFontAttributes property on the TitleBar to control the font style of the window title.
    • Default value is None (to highlight the app title).
    • Users can customize it to Italic, Bold, or None as needed.

Public API Changes

  • New Property Added: TitleFontAttributes (on TitleBar)
  • Type: FontAttributes
  • Default Value: None
  • Description: Controls the font style of the window title. Supports Bold, Italic, and None.

Screenshot

Windows Mac
Windows-TitleBar.mp4
Mac-TitleBar.mov

Usage Example

Xaml:

<Window.TitleBar>
    <TitleBar Title="My App"
              TitleFontAttributes="Italic" />
</Window.TitleBar>

C#:

public partial class App : Application
{
  protected override Window CreateWindow(IActivationState? activationState)
  {
     var window = new Window(new SandboxShell());
     window.TitleBar = new TitleBar
     {
      Title = "MauiApp",
      TitleFontAttributes = FontAttributes.Bold,
     };

   return window;
  }
}
 

Issues Fixed

Fixes #24627

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Sep 30, 2025
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman marked this pull request as ready for review September 30, 2025 08:06
Copilot AI review requested due to automatic review settings September 30, 2025 08:06
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 TitleFontAttributes property 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

Copy link
Copy Markdown
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing related tests:
image

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman force-pushed the TitleBar-Title-FontAttributes branch from 22fb331 to 026f347 Compare October 1, 2025 07:46
@Tamilarasan-Paranthaman
Copy link
Copy Markdown
Member Author

Failing related tests: image

@jsuarezruiz, I have updated the test sample, and committed the images

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman changed the title [.NET10] [Enhancement] Display Window Title in bold by default with configurable font attributes [Enhancement] Added support for customizing the window title with configurable font attributes Dec 5, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman changed the base branch from net10.0 to net11.0 December 9, 2025 05:10
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman force-pushed the TitleBar-Title-FontAttributes branch from 3612317 to f91e337 Compare December 9, 2025 05:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 9, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 31820

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 31820"

@rmarinho
Copy link
Copy Markdown
Member

/rebase

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman force-pushed the TitleBar-Title-FontAttributes branch from 8a3edc8 to 186a9be Compare February 2, 2026 06:33
@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 21, 2026

⚠️ Merge Conflict Detected — This PR has merge conflicts with its target branch. Please rebase onto the target branch and resolve the conflicts.

Copy link
Copy Markdown
Contributor

@kubaflo kubaflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please resolve conflicts?

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman force-pushed the TitleBar-Title-FontAttributes branch from 186a9be to 1685ae6 Compare March 23, 2026 06:24
@Tamilarasan-Paranthaman
Copy link
Copy Markdown
Member Author

Could you please resolve conflicts?

@kubaflo, Conflicts have been resolved

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 23, 2026

⚠️ Merge Conflict Detected — This PR has merge conflicts with its target branch. Please rebase onto the target branch and resolve the conflicts.

3 similar comments
@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 25, 2026

⚠️ Merge Conflict Detected — This PR has merge conflicts with its target branch. Please rebase onto the target branch and resolve the conflicts.

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 25, 2026

⚠️ Merge Conflict Detected — This PR has merge conflicts with its target branch. Please rebase onto the target branch and resolve the conflicts.

@MauiBot
Copy link
Copy Markdown
Collaborator

MauiBot commented Mar 29, 2026

⚠️ Merge Conflict Detected — This PR has merge conflicts with its target branch. Please rebase onto the target branch and resolve the conflicts.

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman force-pushed the TitleBar-Title-FontAttributes branch from 1685ae6 to 787bf5d Compare March 30, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-titlebar community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/macos macOS / Mac Catalyst platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants