Category / Section
How to get the order of the controls in WinForms Docking Manager?
1 min read
Get order of the docked child
Arrangement of child elements in the WinForms DockingManager will be based on the order in which the child has been added in DockingManager. We can get the order of the controls which is added as a child of the Docking Manager using DockAreaControllers property of Docking Manager. For instance, we have iterated the child elements from the collection of DockAreacontrollers and displayed the DockLabel of child element in output window. The following code demonstrate the same,
C#
for (int i = 0; i < dockingManager1.DockAreaControllers.Count; i++) { if (dockingManager1.DockAreaControllers[i] is DockHostController) { Console.WriteLine((dockingManager1.DockAreaControllers[i] as DockHostController).DockLabel); } }
Samples:
UG document link: https://help.syncfusion.com/windowsforms/dockingmanager/dealing-with-docking-child#get-order-of-the-docked-child