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

keeping minimum size when docking

Thread ID:





91898 Dec 8,2009 10:28 PM UTC Dec 9,2009 06:44 AM UTC WinForms 1
Tags: Tools
Jonathan Richard
Asked On December 8, 2009 10:28 PM UTC


I wonder if it possible to keep the minimum size of two windows when I dock one into the other.

For example, suppose window1 has a size of (100,200) and window2 has a size of (150,250). When I dock window1 into the bottom of window2 the resulting window would have a size of (150,450).

It seems that the default behavior is to keep the target window size (and split it in two) without taking in account the minimum sizes of the two windows.

Thank you


Githanjali S [Syncfusion]
Replied On December 9, 2009 06:44 AM UTC

Hi Jonathan,

You can set minimum size for a docked control using SetControlMinimumSize method in DockingManager's NewDockStateEndLoad event handler.

Here is the code snippet:


void dockingManager1_NewDockStateEndLoad(object sender, EventArgs e)
this.dockingManager1.DockControl(userCtrl1, this, DockingStyle.Left, 50); //where userCtrl1 and userCtrl2 are usercontrols
this.dockingManager1.DockControl(userCtrl2, this, DockingStyle.Left, 50);

this.dockingManager1.SetControlMinimumSize(userCtrl1, new Size(100, 100));
this.dockingManager1.SetControlMinimumSize(userCtrl2, new Size(100, 100));



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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