Hi 0L,
You could simulate the click of close button by using the method SetDockVisibility.
dockingManager1.SetDockVisibility(control,true/false);//false to hide.Same as close button.
The method SetEnableDocking is used to add or remove a control to or from the layout of DockingManager.
dockingManager1.SetEnableDocking(control,false/true);false to delete a control from dockinglayout and then it will get it''s previous position.
The SaveDockState and LoadDockState methods are implemented to persist the dockstate(last position and properties).For more details please see
this knowledge base artilce
Please let me know ,if you need more assistance.
Regards,
Joy