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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to Set the Color and Font Style to the Active tab in the Docked Tab window?


If the docking windows are grouped together as the DockTab control, then it will internally initiate the DockTabController as the Parent controller of the DockHostcontrol. By this DockTabController we can access the Tabbed group docking windows.

The above procedures are implemented as the following code:


private void dockingManager1_DockStateChanged(object sender, System.EventArgs e)


Syncfusion.Windows.Forms.Tools.DockHost dhost = this.panel1.Parent as Syncfusion.Windows.Forms.Tools.DockHost; //panel1 is a docked control and currently in tabbed style

Syncfusion.Windows.Forms.Tools.DockHostController dhc = dhost.InternalController as Syncfusion.Windows.Forms.Tools.DockHostController;

if(dhc.ParentController is Syncfusion.Windows.Forms.Tools.DockTabController)


//Accessing the Internal Tab

Syncfusion.Windows.Forms.Tools.DockTabControl docktab = (dhc.ParentController as Syncfusion.Windows.Forms.Tools.DockTabController).TabControl;

//Setting the Font style and color for the selected Tab.

docktab.ActiveTabFont = new System.Drawing.Font("TimesNewRoman",10,FontStyle.Bold);

docktab.ActiveTabColor= System.Drawing.Color.FromArgb(196,214,233);

//Setting the Font Style for Inactive tab

docktab.InactiveTabColor= System.Drawing.Color.FromArgb(102,110,152);

docktab.Font= new System.Drawing.Font("Arial",10);




Private Sub dockingManager1_DockStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dockingManager1.NewDockStateEndLoad

Dim dhost As Syncfusion.Windows.Forms.Tools.DockHost = CType(IIf(TypeOf Me.panel1.Parent Is Syncfusion.Windows.Forms.Tools.DockHost, Me.panel1.Parent, Nothing), Syncfusion.Windows.Forms.Tools.DockHost) 'panel1 is a docked control and currently in tabbed style

Dim dhc As Syncfusion.Windows.Forms.Tools.DockHostController = CType(IIf(TypeOf dhost.InternalController Is Syncfusion.Windows.Forms.Tools.DockHostController, dhost.InternalController, Nothing), Syncfusion.Windows.Forms.Tools.DockHostController)

If TypeOf dhc.ParentController Is Syncfusion.Windows.Forms.Tools.DockTabController Then

'Accessing the Internal Tab

Dim docktab As Syncfusion.Windows.Forms.Tools.DockTabControl = CType(IIf(TypeOf dhc.ParentController Is Syncfusion.Windows.Forms.Tools.DockTabController, dhc.ParentController, Nothing), Syncfusion.Windows.Forms.Tools.DockTabController).TabControl

'Setting the Font style and color for the selected Tab.

docktab.ActiveTabFont = New System.Drawing.Font("TimesNewRoman",10,FontStyle.Bold)

docktab.ActiveTabColor= System.Drawing.Color.FromArgb(196,214,233)

'Setting the Font Style for Inactive tab

docktab.InactiveTabColor= System.Drawing.Color.FromArgb(102,110,152)

docktab.Font= New System.Drawing.Font("Arial",10)

End If

End Sub

Article ID: Published Date: Last Revised Date: Platform: Control:
1268 04/30/2011 07/10/2014 WinForms DockingManager
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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