Skip to main content
All docs
V25.1
  • IDockController.CreateCommand<T>(BaseLayoutItem) Method

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

    Namespace: DevExpress.Xpf.Docking

    Assembly: DevExpress.Xpf.Docking.v25.1.dll

    NuGet Package: DevExpress.Wpf.Docking

    Declaration

    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

    You can bind the following DockLayoutManager dock commands to a button:

    Command Name Description Related Method
    ActivateCommand Activates a panel. DockControllerBase.Activate.
    CloseCommand Closes (hides) a panel. DockControllerBase.Close.
    DockCommand Docks a panel to the root panel. DockControllerBase.Dock.
    FloatCommand Makes the panel floating. DockControllerBase.Float.
    HideCommand Enables the auto-hide feature for the panel. DockControllerBase.Hide.
    RestoreCommand Restores a panel from the closed state and makes it visible. DockControllerBase.Restore.

    The following code sample binds the ActivateCommand to the button click:

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