How to: Associate a Command Provided by the DXDocking Library with a Button
The DXDocking library provides a set of commands on dock panels. These are declared in the DockControllerCommand class. For instance, the Close command allows you to close a specific dock panel. The Activate command activates a dock panel.
This example shows how to associate the Close command with a button. When an end-user clicks the button, the active dock panel is closed.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-use-built-in-dxdocking-commands-in-custom-buttons-e1620.
<Button Command="dxdo:DockControllerCommand.Close" CommandTarget="{Binding ElementName=dockManager1}" CommandParameter="{Binding ElementName=dockManager1, Path=ActiveDockItem }">