How to display Usercontrol as MDI child in WinForms TabbedMDIManager?
Display usercontrol as MDI child
In TabbedMDI Manager, User control cannot be added as MDI Child. This requirement can be achieved by using functions named SetEnableDocking and SetAsMDIChild in DockingManager.
SetEnableDocking - To add User control as Docking child control.
SetAsMDIChild - To set user control as MDI child.
UserControl1 user = new UserControl1(); //Enable Docking Manager on User Control this.dockingManager1.SetEnableDocking(user, true); //To set the User Control as an MDI child this.dockingManager1.SetAsMDIChild(user, true);
Dim user As New UserControl1() 'Enable Docking Manager on User Control Me.dockingManager1.SetEnableDocking(user, True) 'To set the User Control as an MDI child Me.dockingManager1.SetAsMDIChild(user, True)
Figure 1. User control as Tab in TabbedMDI with Image.