BaseLayoutItem.CloseCommand Property

Gets or sets a command executed when the current item's close button ('x') is clicked. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

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

Declaration

public ICommand CloseCommand { get; set; }
Public Property CloseCommand As ICommand

Property Value

Type Description
ICommand

A ICommand object executed when the current item's close button ('x') is clicked.

Remarks

If no command is assigned to the CloseCommand property, the current item is removed from view when it is closed. After the item is closed, it is either completely removed, or stored in the DockLayoutManager.ClosedPanels collection. The way in which items are closed is specified by the DockLayoutManager.ClosingBehavior and BaseLayoutItem.ClosingBehavior properties.

If a command is assigned to the CloseCommand property, the current item is not removed from view, nor is it closed. In this case, you can manually close the item with the DockControllerBase.Close method, or disassociate the item from the DockLayoutManager with the DockControllerBase.RemovePanel method.

The CloseCommand is not executed when the item is closed with the BaseLayoutItem.Closed property or the DockControllerBase.Close method.

See Also