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

Stopping a docked window being added as a MDI child

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

1 Reply

JK Joy K George Syncfusion Team July 25, 2006 03:01 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon