Skip to main content
A newer version of this page is available. .

IDockController.Dock(BaseLayoutItem, BaseLayoutItem, DockType) Method

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

Namespace: DevExpress.Xpf.Docking

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Docking, DevExpress.Wpf.Navigation

Declaration

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

Parameters

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.

Returns

Type Description
Boolean

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

Remarks

The type parameter specifies how the first item is docked to the target item. If the parameter is DockType.None, the item is not docked and the Dock method returns false.

Set the type parameter to DockType.Fill and target to a LayoutPanel or TabbedGroup to combine items into a tab group.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Dock(BaseLayoutItem, BaseLayoutItem, DockType) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also