Skip to main content

DockControllerBase.CreateCommand<T>(BaseLayoutItem) Method

Creates the specified dock command for the specified item/pane.

Namespace: DevExpress.Xpf.Docking

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

NuGet Package: DevExpress.Wpf.Docking

Declaration

public T CreateCommand<T>(
    BaseLayoutItem item
)
    where T : DockControllerCommand, new()

Parameters

Name Type Description
item BaseLayoutItem

A BaseLayoutItem descendant with which the created command is associated.

Type Parameters

Name
T

Returns

Type Description
T

The created command.

Remarks

There exist several dock commands provided by the DXDocking library supporting the dock functionality. You can bind commands to buttons. As a result, clicking the button will invoke the corresponding dock functionality. The following are the available dock commands, declared in the DevExpress.Xpf.Docking namespace:

buttonUndo.Command = DockLayoutManager1.DockController.CreateCommand
    <DevExpress.Xpf.Docking.ActivateCommand>(paneMessages);

For more information on commands, see the Commanding Overview topic in MSDN.

See Also