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.v24.2.dll
NuGet Package: DevExpress.Wpf.Docking
Declaration
Parameters
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. |
Returns
Type | Description |
---|---|
Boolean | A Boolean value that specifies that the item has been successfully moved. |
Remarks
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);
Example
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.
dockLayoutManager1.LayoutController.Move(layoutItemEditor1, layoutItemButton1, MoveType.Left)