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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use UserControls as TabbedMDIManager’s children ?

 

Normally tabbed-MDI is used in MDI applications where the child forms are the children that get tabbed. But, it is also possible to use tabbed-MDI with UserControls as its children and that are dockable. Please refer the below code snippet which illustrates this:

C#

this.IsMdiContainer = true;

this.tb.AttachToMdiContainer(this);

this.userControl11.Parent = this;

this.userControl21.Parent = this;

// Dock the usercontrol11 to the form

this.dockingManager1.DockControl(this.userControl11, this, DockingStyle.Bottom, 200);

// Make userControl11 as other controls parent

this.dockingManager1.DockControl(this.userControl21, this.userControl11, DockingStyle.Tabbed, 200);

// Set the usercontrols to MDI mode

this.dockingManager1.SetAsMDIChild(this.userControl11, true);

this.dockingManager1.SetAsMDIChild(this.userControl21, true);

VB

Me.IsMdiContainer = True

Me.tb.AttachToMdiContainer(Me)

Me.UserControl11.Parent = Me

Me.UserControl21.Parent = Me

' Dock the usercontrol11 to the form

Me.dockingManager1.DockControl(Me.UserControl11, Me, DockingStyle.Bottom, 200)

' Make userControl11 as other controls parent

Me.dockingManager1.DockControl(Me.UserControl21, Me.UserControl11, DockingStyle.Tabbed, 200)

' Set the usercontrols to MDI mode

Me.dockingManager1.SetAsMDIChild(Me.UserControl11, True)

Me.dockingManager1.SetAsMDIChild(Me.UserControl21, True)

Sample:

http://websamples.syncfusion.com/samples/KB/Tools.Windows/TUserControl/main.htm

Article ID: Published Date: Last Revised Date: Platform: Control:
1338 04/30/2011 07/10/2014 WinForms TabbedMDIManager
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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