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.
Namespace: DevExpress.XtraBars.Docking
Assembly: DevExpress.XtraBars.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
public void DockTo(
DockPanel panel,
DockingStyle dock,
int index
)
#Parameters
Name | Type | Description |
---|---|---|
panel | Dock |
A Dock |
dock | Docking |
A Docking |
index | Int32 | A zero-based integer specifying the position at which to dock the current panel. |
#Remarks
If the current panel is docked to a split container or tab container, it’s added as a new child to this container.
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.
Note
- If a panel is docked into a Document
Manager’s TabbedView ,Dock
methods do not affect this panel until you set its DockTo Panel. property toDocked As Tabbed Document false
.