Dockable Windows - Best Practices

I have an MDI application which has multiple dockable windows. It was very easy to add a panel to the MDI container and set it’s ”Enable Docking on DockingManager” property. However, there is a fair amount of cose behind each of these dockable windows which ends up in the MDI's code file which is quite large. Ideally, there would be a way to seperate the code.

I'm curently looking to convert one of my standard forms to a docking window. I know that I could add a panel to the MDI, copy the conrols to the panel and then paste all of the code into the MDI code window, but I'm hoping that there is a clean way of seperating things out.

1 Reply

AD Administrator Syncfusion Team November 3, 2006 06:52 PM UTC

Hi Scott,

A Standard Form can be docked to the MDI Window by using the SetEnableDocking() method of the DockingManager.

this.dockingManager1.SetEnableDocking(frmChild,true);

For this to work, you have to set the following properties to the Child form.

frmChild.TopLevel = false;
frmChild.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

Here is the link of the KB which explains the same.
How to dock a form within a host form?

I have also attached a sample. Kindly look in to it and let me know whether this is what you actually needed.

Docking_Forum.zip

Thanks,
Purusothaman.R

Loader.
Up arrow icon