New to Telerik UI for WinFormsStart a free 30-day trial

Aligning Text in RadTitleBar

Updated on Sep 24, 2025

Environment

Product VersionProductAuthor
2024.4.1113RadForm/RadTitleBar for WinFormsDinko Krastev

Description

This example demonstrates how to align the text in the title bar of a RadForm or in a stand-alone RadTitleBar control.

Solution

To center the text in the RadForm title bar, set the Alignment property of the CaptionElement to ContentAlignment.MiddleCenter. This adjustment aligns the title bar text to the middle center.

C#

this.FormElement.TitleBar.CaptionElement.Alignment = ContentAlignment.MiddleCenter;
 

To center the text in the RadTitleBar as a stand-alone control, set the Alignment property of the CaptionElement to ContentAlignment.MiddleCenter. This adjustment aligns the title bar text to the middle center.

C#

this.radTitleBar1.TitleBarElement.CaptionElement.Alignment = ContentAlignment.MiddleCenter;

By applying this code, the text in the RadTitleBar will be centered, providing a visually appealing and balanced appearance for the title bar of your WinForms application.

See Also