Skip to main content

How to: Write and read a docking layout to and from an XML file

The following code can be used to read and write the layout of dock panels from and to an XML file.

string xmlFile = "c:\\XtraBars\\DockStates\\MainState.xml";
dockManager1.SaveLayoutToXml(xmlFile);

// ...

dockManager1.RestoreLayoutFromXml(xmlFile);