Articles in this section
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:

C#:https://www.syncfusion.com/downloads/support/directtrac/general/ze/DockingManager_Order_Information1627063723.zip

VB:https://www.syncfusion.com/downloads/support/directtrac/general/ze/DockingManager_DockInfo_VB-281789522.zip

UG document link: https://help.syncfusion.com/windowsforms/dockingmanager/dealing-with-docking-child#get-order-of-the-docked-child

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied