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.v19.1.dll
Declaration
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.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CloseCommand property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.