Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IDockController.CreateCommand<T>(BaseLayoutItem) Method

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

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.2.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