Skip to main content

DockControllerBase.Dock(BaseLayoutItem, BaseLayoutItem, DockType) Method

Docks the first item to the second item using the specified dock type.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v22.2.dll

NuGet Package: DevExpress.Wpf.Docking


public bool Dock(
    BaseLayoutItem item,
    BaseLayoutItem target,
    DockType type


Name Type Description
item BaseLayoutItem

The item to be docked.

target BaseLayoutItem

The item to which the first item is docked.

type DockType

A DockType value that specifies how the first item is docked.


Type Description

true, if the item has been successfully docked; otherwise, false.


The type parameter specifies how the first item is docked to the target item. Set the type parameter to DockType.Top, DockType.Left, DockType.Bottom or DockType.Right to dock the item to the corresponding edge of the target item. If this parameter is set to DockType.None, the item is not docked and the Dock method returns false.

To combine items into a tab group:

  1. set the _type_parameter to DockType.Fill.
  2. set the _target_parameter to a LayoutPanel or TabbedGroup.
See Also