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.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
panel | DockPanel | A DockPanel object that is the target dock panel. |
dock | DockingStyle | A DockingStyle enumerator value specifying how the current panel is docked to the target panel. |
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 DocumentManager’s TabbedView,
DockTo
methods do not affect this panel until you set its DockPanel.DockedAsTabbedDocument property tofalse
.