DockPanel.DockTo(DockPanel, DockingStyle, Int32) Method
Docks the current panel on the form (user control) to the specified panel at the specified position using the specified style.
public void DockTo( DockPanel panel, DockingStyle dock, int index )
Public Sub DockTo( panel As DockPanel, dock As DockingStyle, index As Integer )
A DockPanel object that is the target dock panel.
A DockingStyle enumerator value specifying how the current panel is docked to the target panel.
A zero-based integer specifying the position at which to dock the current panel.
If the target panel does not contain children, a split container is created in place of the target panel. The split container will display both the target and current panel.
The dock parameter specifies how the panel is docked - to the target panel's left, right, bottom or top edge.
The index parameter specifies the position in which the current panel is docked. Set the index parameter to 0 to add the panel as the first one amongst the target container's children. Set index to 1 to add the panel as the second one, etc. Setting the index parameter to -1appends the panel to the container. To get the position of a panel amongst its sibling panels, use the DockPanel.Index property.