)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the caption alignment in the WinForms Office2007Form?

Platform: WinForms |
Control: Office2007Form |
Published Date: March 2, 2015 |
Last Revised Date: January 7, 2020

Customize the caption alignment

The Caption alignment can be specified in the Office2007Form by disabling its property, ApplyAeroTheme. This property enables or disables Aero theme when the Office2007Form is enabled.  By disabling the ApplyAeroTheme, the title alignment can be changed by using its property, CaptionAlign. The following code example demonstrates the same.

C#

//Disables Aerotheme.
this.ApplyAeroTheme = false;
//Sets left alignment of the form title.
this.CaptionAlign = HorizontalAlignment.Left;
//Sets center alignment of the form title.
this.CaptionAlign = HorizontalAlignment.Center;
//Sets right alignment of the form title.
this.CaptionAlign = HorizontalAlignment.Right;

VB

'Disables Aerotheme.
Me.ApplyAeroTheme = False
'Sets left alignment of the form title.
Me.CaptionAlign = HorizontalAlignment.Left
'Sets center alignment of the form title.
Me.CaptionAlign = HorizontalAlignment.Center
'Set right alignment of the form title.
Me.CaptionAlign = HorizontalAlignment.Right

 

Title aligned in left side of the window

Figure 1: Title aligned to the left side of the window

Title aligned in center of the window

Figure 2: Title aligned to the center of the window

Title aligned in right side of the window

Figure 3: Title aligned to the right side of the window

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/Office2007392487911.zip

Reference link: https://help.syncfusion.com/windowsforms/office2007form/customization

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon