How to customize background and foreground of dock window caption in DockingManager?
WinForms Docking Manager provides customization properties to change the header background and foreground of dock window.
Property | Usage |
ActiveCaptionBackground
InActiveCaptionBackground
ActiveCaptionButtonForeColor
InActiveCaptionButtonForeColor
MetroInactiveCaptionColor
MetroCaptionColor
ActiveCaptionFont
InActiveCaptionFont
| Used to set the active window caption background color
Used to set the inactive window caption background color
Used to set the active window caption button forecolor
Used to set the inactive window caption button forecolor
Used to set the active window caption forecolor
Used to set the inactive window caption forecolor
Used to set the active window caption font
Used to set the inactive window caption font |
The following Code demonstrates the same.
C#
//Active Caption ForeColor this.dockingManager1.MetroCaptionColor = Color.Blue; //InActive Caption ForeColor this.dockingManager1.MetroInactiveCaptionColor = Color.Yellow; //Active Caption BackColor this.dockingManager1.ActiveCaptionBackground = new Syncfusion.Drawing.BrushInfo(Color.Red); //InActive Caption Background color this.dockingManager1.InActiveCaptionBackground = new Syncfusion.Drawing.BrushInfo(Color.Green); //Active CaptionButton ForeColor this.dockingManager1.ActiveCaptionButtonForeColor = Color.Yellow; //InActive CaptionButton ForeColor this.dockingManager1.InActiveCaptionButtonForeColor = Color.HotPink; //InActive Caption Font this.dockingManager1.InActiveCaptionFont = new Font("Algerian", 12.0f); //Active Caption Font this.dockingManager1.ActiveCaptionFont = new Font("TimesNewRoman", 12.0f);
VB
'Active Caption Fore Color Me.dockingManager1.MetroCaptionColor = Color.Blue 'InActive Caption ForeColor Me.dockingManager1.MetroInactiveCaptionColor = Color.Yellow 'Active Caption BackColor Me.dockingManager1.ActiveCaptionBackground = New Syncfusion.Drawing.BrushInfo(Color.Red) 'InActive Caption Background color Me.dockingManager1.InActiveCaptionBackground = New Syncfusion.Drawing.BrushInfo(Color.Green) 'Active Caption Button ForeColor Me.dockingManager1.ActiveCaptionButtonForeColor = Color.Yellow 'InActive Caption Button ForeColor Me.dockingManager1.InActiveCaptionButtonForeColor = Color.HotPink 'In Active Caption Font Me.dockingManager1.InActiveCaptionFont = New Font("Algerian", 12.0F) 'Active Caption Font Me.dockingManager1.ActiveCaptionFont = New Font("TimesNewRoman", 12.0F)
Screenshot
Samples: