Documentation for DockContainer

DockContainer.DockToolWindow Method 

Dock the given tool window inside the dock container.

public void DockToolWindow(
   DockableToolWindow toolWindow,
   zDockMode dockMode
);

Parameters

toolWindow
tool window to be docked. If the tool window is not in the container when this method is called, then the window is added as if AddToolWindow method was invoked.
dockMode
dock mode of the tool window can be Left, Right, Top, Bottom, Fill or None, but not a combination of these.

Remarks

This method assume that tool window is not null. A NullReferenceException will be thrown if the tool window is null.
If the dock mode is None or is not Left, Right, Top, Bottom or Fill, then the tool window is floating.

Example

Here is a sample of how to use this method. It will add a form to the dock container with initial docking on Left.

private void OnCreateNewToolWindowDockedLeft (object sender, EventArgs e)
{
   // Create a new instance of the child form.
   DockableToolWindow childForm = new DockableToolWindow ();

   // Add and dock the form in the left panel of the container
   _dockContainer1.DockToolWindow (childForm, zDockMode.Left);

   // Show the form
   childForm.Show ();
}

See Also

DockContainer Class | Crom.Controls Namespace