Back to Devexpress

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

windowsforms-5434-controls-and-libraries-docking-library-examples-how-to-write-and-read-a-docking-layout-to-and-from-an-xml-file.md

latest600 B
Original Source

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

  • Nov 13, 2018

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

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

// ...

dockManager1.RestoreLayoutFromXml(xmlFile);
vb
Dim xmlFile As String = "c:\XtraBars\DockStates\MainState.xml"
DockManager1.SaveLayoutToXml(xmlFile)

    '...

DockManager1.RestoreLayoutFromXml(xmlFile)