I created a dockpane with a cancel button, I want to close (not hide) the dockpane when I click cancel.
Is there a specific reason you want to close it with a cancel button? It comes with a closing control already.
I use the same Add-ins button to open or close dockpane. To close dockpane just call Hide();