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.
Unfortunately, activation email could not send to your email. Please try again.

keeping minimum size when docking

Thread ID:

Created:

Updated:

Platform:

Replies:

91898 Dec 8,2009 05:28 PM Dec 9,2009 01:44 AM Windows Forms 1
loading
Tags: Tools
Jonathan Richard
Asked On December 8, 2009 05:28 PM

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

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

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

CONFIRMATION

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.

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.

;