We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to dock child control between two Docking Manager?

Platform: WinForms |
Control: DockingManager |
Published Date: April 28, 2016 |
Last Revised Date: May 23, 2019

Docking Manager supports to dock its child control into another Docking Manager. It can be achieved by using its functions named AddToTargetManagersList and RemoveFromTargetManagersList.

 

AddToTargetManagerList

 

This function helps to interconnect two Docking Manager, so that its child controls can be docked between two Docking Manager.

 

RemoveFromTargetManagersList

 

This function helps to remove interconnection between two Docking Manager.

 

The following code example demonstrates the same.

C#

//To set the docked controls that transformed to child controls.
Form2 ChildWindow = new Form2();
ChildWindow.Show();
this.dockingManager1.AddToTargetManagersList(ChildWindow.dockingManager1);
ChildWindow.dockingManager1.AddToTargetManagersList(this.dockingManager1);
 
//To remove DockingManager from MainForm's TargetManagerList. 
ChildWindow.dockingManager1.RemoveFromTargetManagersList(this.dockingManager1);
this.dockingManager1.RemoveFromTargetManagersList(ChildWindow.dockingManager1);

 

VB

'To set the docked controls, that transformed to child controls.
ChildWindow = New Form2()
ChildWindow.Show()
Me.dockingManager1.AddToTargetManagersList(ChildWindow.dockingManager1)
ChildWindow.dockingManager1.AddToTargetManagersList(Me.dockingManager1)
 
'To remove DockingManager from MainForm's TargetManagerList. 
ChildWindow.dockingManager1.RemoveFromTargetManagersList(Me.dockingManager1)
Me.dockingManager1.RemoveFromTargetManagersList(ChildWindow.dockingManager1)

 

Note:

In AddToTargetManagersList, specifying a DockingManager as a target provider in, target list allows the docked controls that being dragged and dropped onto the docking layout hosted by the target manager.

 

 

Dockingmanager2 controls docked into Dockingmanager1

Figure 1: DockingManager2 controls docked in DockingManager1 by using AddToTargetManagersList.

Dockingmanager1 controls docked into Dockingmanager1

Figure 2: DockingManager1 controls docked into DockingManager1 by using AddToTargetManagersList.

Showing remove the TargetManagerList

Figure 3: TargetManagerList has been removed by using the RemoveFromTargetManagersList method.

Sample Links:

 

C#: LinkingManager C# Sample

 

VB: LinkingManager VB Sample

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon