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. Image for the cookie policy date
close icon

keeping minimum size when docking

Hi,

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

Jonathan

1 Reply

GS Githanjali S Syncfusion Team 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:

[C#]

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));
}


Regards,
Githanjali

Loader.
Live Chat Icon For mobile
Up arrow icon