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.

Stopping a docked window being added as a MDI child

Thread ID:

Created:

Updated:

Platform:

Replies:

46899 Jul 24,2006 12:00 PM Jul 25,2006 11:01 AM Windows Forms 1
loading
Tags: Tools
Stephen Kew
Asked On July 24, 2006 12:00 PM

Hi,

I am using the DockingManager with the TabbedMDIManager and the problem I am experiencing is that with the Whidbey and VS2005 drag style providers, it is possible to drag a docked control and re-dock it as a MDI child window.

So in the case of the Visual Studio example, I would be able to dock the Solution Explorer so that it is tabbed in the MDI Client area with the C# source files. (see attached image)

I was wondering if there was a way for me to prevent that behaviour?

Thanks

vs_net_demo_mdi_docking.zip

Joy K George [Syncfusion]
Replied On July 25, 2006 11:01 AM

Hi Stephen,

Sorry for the delay in getting back to you.

It is possible to prevent a control from being MDI child by handling the event DockAllow.Here is the code snippet.

private void dockingManager1_DockAllow(object sender, Syncfusion.Windows.Forms.Tools.DockAllowEventArgs arg){
//Prevents control pnlpanel1 from being MDI Child
if(arg.DragControl==pnlpanel1 && arg.DockStyle==DockingStyle.Tabbed ) arg.Cancel=true;
}

Attached sample implements this logic.Please take a look into that.

Thanks for choosing Syncfusion products.
Regards,
Joy

fr_46889_sample.zip

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.

;