)
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 set the caption font style and foreground settings in WinForms Docking Manager?

Platform: WinForms |
Control: DockingManager |
Published Date: April 30, 2011 |
Last Revised Date: December 4, 2019

Customize caption

Caption FontStyle and foreground settings, for an active docked control, can be controlled by ActiveCaptionFont and ActiveCaptionForeground properties. By setting the InactiveCaptionFont and InactiveCaptionForeGround properties, the caption foreground appearance of the inactive controls among the docked controls can be customized. These settings will affect only with DockingManager.VisualStyle property set as Default.

C#

private void dockingManager1_NewDockStateEndLoad(object sender, EventArgs e)
{
    // Setting caption for active docking control
    this.dockingManager1.ActiveCaptionFont = new System.Drawing.Font("Comic Sans MS", 9.75F,    System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
    this.dockingManager1.ActiveCaptionForeGround = System.Drawing.Color.Red;
   //Setting Caption for inactive docking control
   this.dockingManager1.InActiveCaptionFont = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.dockingManager1.InActiveCaptionForeGround = System.Drawing.Color.Blue;
}

 

VB

Private Sub dockingManager1_NewDockStateEndLoad(ByVal sender As Object, ByVal e As EventArgs) Handles dockingManager1.NewDockStateEndLoad
   '' Setting caption for active docking control
   Me.dockingManager1.ActiveCaptionFont = New System.Drawing.Font("Comic Sans MS", 9.75F,  System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (CByte(0)))
   Me.dockingManager1.ActiveCaptionForeGround = System.Drawing.Color.Red
   ''Setting Caption for inactive docking control
   Me.dockingManager1.InActiveCaptionFont = New System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (CByte(0)))
   Me.dockingManager1.InActiveCaptionForeGround = System.Drawing.Color.Blue
End Sub

 

UG document link: https://help.syncfusion.com/windowsforms/dockingmanager/appearance#customize-caption

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