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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the TabStyle of the WinForms Docking Manager?

Platform: WinForms |
Control: DockingManager

Applying the Tabstyle

There is no straight method or property to achieve this. but this can be achieved by getting the DockTabControl object from DockHostController and apply the TabStyle for the DockTabControl. Please refer the below code snippet which illustrates this:


private void button1_Click(object sender, EventArgs e)
   Syncfusion.Windows.Forms.Tools.DockHost dhost = this.panel1.Parent as  Syncfusion.Windows.Forms.Tools.DockHost;
   Syncfusion.Windows.Forms.Tools.DockHostController dhc = dhost.InternalController as
   if (dhc.ParentController is Syncfusion.Windows.Forms.Tools.DockTabController)
      //Accessing the DockTabControl from the DockHostController
      Syncfusion.Windows.Forms.Tools.DockTabControl docktab = (dhc.ParentController as
      //Applying the TabStyle to the DockTabControl
      docktab.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.OneNoteStyleRenderer);



Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click
    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)
    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 DockTabControl from the DockHostController
       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
       'Applying the TabStyle to the DockTabControl
       docktab.TabStyle = GetType(Syncfusion.Windows.Forms.Tools.OneNoteStyleRenderer)
    End If
End Sub


Sample: http://help.syncfusion.com/support/samples/KB/Tools.Windows/TDTabStyle/TabStyle.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
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