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 use UserControls as TabbedMDIManager’s children ?

Platform: WinForms |
Control: TabbedMDIManager |
Published Date: April 30, 2011 |
Last Revised Date: July 10, 2014

 

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

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.

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