)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to avoid docked controls from being placed on Form controls in WinForms Docking Manager?

Platform: WinForms |
Control: DockingManager |
Published Date: February 13, 2015 |
Last Revised Date: December 4, 2019

Avoid docked controls

DockingClientPanel can be used to avoid docked controls that are to be placed on the Form controls.

The following code example is to demonstrate the same.

C#

//Docking client panel initialization
private Syncfusion.Windows.Forms.Tools.DockingClientPanel dockingClientPanel1;
this.dockingClientPanel1 = new Syncfusion.Windows.Forms.Tools.DockingClientPanel();
this.dockingClientPanel1.SuspendLayout();
//To set dock control
this.dockingManager1.DockControl(this.panel1, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 200);
this.dockingManager1.DockControl(this.panel2, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Right, 200);
//To set docking client panel properties
this.dockingClientPanel1.BackColor = System.Drawing.SystemColors.ActiveBorder;
this.dockingClientPanel1.Controls.Add(this.button1);
this.dockingClientPanel1.Location = new System.Drawing.Point(423, 35);
this.dockingClientPanel1.Name = "dockingClientPanel1";
this.dockingClientPanel1.Size = new System.Drawing.Size(200, 200);
this.dockingClientPanel1.TabIndex = 0;
//Add the docking client panel to the form
this.Controls.Add(this.dockingClientPanel1);
this.dockingClientPanel1.ResumeLayout(false);

VB

Dim dockingClientPanel1 As Syncfusion.Windows.Forms.Tools.DockingClientPanel
Me.dockingClientPanel1 = New Syncfusion.Windows.Forms.Tools.DockingClientPanel
Me.dockingClientPanel1.SuspendLayout()
'To set dock control
Me.dockingManager1.DockControl(Me.panel1, Me, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 200)
Me.dockingManager1.DockControl(Me.panel2, Me, Syncfusion.Windows.Forms.Tools.DockingStyle.Right, 200)
'To set docking client panel properties
Me.dockingClientPanel1.BackColor = System.Drawing.SystemColors.ActiveBorder
Me.dockingClientPanel1.Location = New System.Drawing.Point(423, 35)
Me.dockingClientPanel1.Name = "dockingClientPanel1"
Me.dockingClientPanel1.Size = New System.Drawing.Size(200, 200)
Me.dockingClientPanel1.TabIndex = 0
'Add the docking client panel to the form
Me.Controls.Add(Me.dockingClientPanel1)
Me.dockingClientPanel1.ResumeLayout(False)

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/Docking_ClientPanel412254940.zip

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

Live Chat Icon For mobile
Live Chat Icon