Category / Section
How to Change Docking window into MDI Child window?
1 min read
The SetAsMDIChild method of Docking Manager is used to set the docking window to the MDIChild window.
Please refer the below code snippet which illustrates this:
C#
//Initialize the TabbedMDI Manager TabbedMDIManager tabbedMDI = new TabbedMDIManager(); this.IsMdiContainer = true; //Attach the Form to TabbedMDI Manager. tabbedMDI.AttachToMdiContainer(this); //To set as MDI Child window this.dockingManager1.SetAsMDIChild(panel, true); //To get back to Docking window from MDI Child window this.dockingManager1.SetAsMDIChild(this.panel1, false);
VB
'Initialize the TabbedMDI Manager Dim tabbedMDI As New TabbedMDIManager() Me.IsMdiContainer = True 'Attach the Form to TabbedMDI Manager. tabbedMDI.AttachToMdiContainer(Me) 'To set as MDI Child window Me.dockingManager1.SetAsMDIChild(panel, True) 'To get back to Docking window from MDI Child window Me.dockingManager1.SetAsMDIChild(panel, False)
Note:
The property named “IsMdiContainer” needs to enable in order to use the “SetAsMDIChild” function in DockingManager.
Figure 1: Docked control is set as MDI Child.
Sample Links: