How to set icon for docked control in WinForms Docking Manager?
Icon settings
In WinForms Docking Manager, any control can be set as docking child. If user would like to set icon for the docked controls, that can be achieved by using its function named SetDockIcon. The following code examples demonstrates the same.
C#
// To add icon to the Child form which is Dockable Form2 frm2 = new Form2(); frm2.TopLevel = false; frm2.FormBorderStyle = FormBorderStyle.None; this.dockingManager1.DockControl(frm2, this, DockingStyle.Left, 130); this.dockingManager1.SetDockIcon(frm2, 1);
VB
' To add icon to the Child form which is Dockable Dim frm2 As New Form2() frm2.TopLevel = False frm2.FormBorderStyle = FormBorderStyle.None Me.dockingManager1.DockControl(frm2, Me, DockingStyle.Left, 130) Me.dockingManager1.SetDockIcon(frm2, 1)
Figure 1. To set icon for the Docked control.
Samples:
C#: How to add icon to the Child form which is dockable C#
VB: How to add icon to the Child form which is dockable VB
UG document link:https://help.syncfusion.com/windowsforms/dockingmanager/dock-window#add-icon-in-header-of-dock-window
Conclusion
I hope you enjoyed learning about how set icon for docked control in WinForms Docking Manager.
You can refer to our WinForms Docking Manager feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.
For current customers, you can check out our 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 other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!