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.

<Button Command="dxdo:DockControllerCommand.Close" CommandTarget="{Binding ElementName=dockManager1}" CommandParameter="{Binding ElementName=dockManager1, Path=ActiveDockItem }">