How to customize the appearance of the Dockable controls?
In WinForms DockingManager, you can customize the appearance of the dockable control by handling the ProvideGraphicsItems event.
The following code example is to demonstrate the same.
C#
//To paint dockable control's caption this.dockingManager1.ProvideGraphicsItems += new Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventHandler(this.dockingManager1_ProvideGraphicsItems); private void dockingManager1_ProvideGraphicsItems(object sender, Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs arg) { //To set the back color of the dock caption arg.CaptionBackground = Brushes.Pink; //To set the caption font arg.CaptionFont = new Font(this.Font.FontFamily, 11, FontStyle.Underline); //To set the caption fore color arg.CaptionForeground = Color.Blue; //To set the caption back color arg.Control.BackColor = Color.White; }
VB
'To paint dockable control's caption AddHandler dockingManager1.ProvideGraphicsItems, AddressOf dockingManager1_ProvideGraphicsItems Private Sub dockingManager1_ProvideGraphicsItems(ByVal sender As Object, ByVal arg As Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs) 'To set the back color of the dock caption arg.CaptionBackground = Brushes.Pink 'To set the caption font arg.CaptionFont = New Font(Me.Font.FontFamily, 11, FontStyle.Underline) 'To set the caption fore color arg.CaptionForeground = Color.Blue 'To set the caption back color arg.Control.BackColor = Color.White End Sub
The following screenshot illustrates the output.
Figure 1: Customized DockingManager
Sample:
https://www.syncfusion.com/downloads/support/directtrac/general/DockingManager-1692503252.zip
Conclusion
I hope you enjoyed learning about how to customize the appearance of the Dockable controls.
You can refer to our WinForms Docking Manager’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms Docking Manager documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms Docking Manager and other WinForms components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!