Category / Section
How to change the fore color and back color of tabbed dock windows in DockingManager?
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:

Sample Link: