Articles in this section
Category / Section

How to change the fore color and back color of tabbed dock windows in DockingManager?

1 min read

BackColor and ForeColor of the items of the DockTab can be changed in WinForms DockingManager using following properties,

ActiveTabForeColor - Using this property ForeColor of the ActiveTab in DockTab can be changed.

InActiveTabForeColor - Using this property ForeColor of the InActiveTab in DockTab can be changed.

ActiveTabColor – Using this property BackColor of the ActiveTab in DockTab can be changed.

InactiveTabColor – Using this property BackColor of the InActiveTab in DockTab can be changed.

The following code example illustrate the same,

 

C#

            dockingManager1.DockTabFont = new Font("Calibri", 10);
            DockTabControl docktab;
            DockHost dhost = this.panel3.Parent as DockHost;
            if (dhost != null)
            {
                DockHostController dhc = dhost.InternalController as 
                                         DockHostController;
                if (dhc != null && dhc.ParentController is DockTabController)
                {
                    docktab = (dhc.ParentController as DockTabController).TabControl;
                    docktab.InActiveTabForeColor = Color.WhiteSmoke;
                    docktab.ActiveTabForeColor = Color.Brown;
                    docktab.TabPanelBackColor = Color.WhiteSmoke;
                    docktab.ActiveTabColor = Color.Yellow;
                    docktab.InactiveTabColor = Color.Black;                     
                }
            }

 

Screenshot:

Showing applied back color and fore color of tabbed dock windows

Sample Link:

https://www.syncfusion.com/downloads/support/directtrac/general/ze/TabForeBackColor_Sample1533342199.zip

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied