Skip to main content

LayoutController.Move(BaseLayoutItem, BaseLayoutItem, MoveType) Method

Moves the specified item to the position next to another item or into another group.

Namespace: DevExpress.Xpf.Docking

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


public bool Move(
    BaseLayoutItem item,
    BaseLayoutItem target,
    MoveType type


Name Type Description
item BaseLayoutItem

A BaseLayoutItem object to be moved.

target BaseLayoutItem

A BaseLayoutItem object to which (or next to which) the item is moved.

type MoveType

A MoveType value that specifies how the item is moved.


Type Description

A Boolean value that specifies that the item has been successfully moved.


An item cannot be moved if the BaseLayoutItem.AllowMove option is disabled. After an item has been moved, the DockLayoutManager.LayoutItemMoved event fires.

The following code shows how to move item1 inside group1:

dockLayoutManager1.LayoutController.Move(item1, group1, DevExpress.Xpf.Layout.Core.MoveType.InsideGroup);


This example shows how to programmatically move a layout item to another position. To move layout items, the LayoutController.Move method is used.

In the example, an item is moved on the left of another item.

View Example

dockLayoutManager1.LayoutController.Move(layoutItemEditor1, layoutItemButton1, MoveType.Left)
See Also