Back to Devexpress

How to: Write and read a docking layout to and from the system registry

windowsforms-5432-controls-and-libraries-docking-library-examples-how-to-write-and-read-a-docking-layout-to-and-from-the-system-registry.md

latest736 B
Original Source

How to: Write and read a docking layout to and from the system registry

  • Nov 13, 2018

The following code can be used to write and read a docking layout to and from the system registry. The full path to the docking layout will be: HKEY_CURRENT_USER\DevExpress\XtraBars\DockStates\MainState.

csharp
string regKey = "DevExpress\\XtraBars\\DockStates\\MainState";
dockManager1.SaveLayoutToRegistry(regKey);

// ...

dockManager1.RestoreLayoutFromRegistry(regKey);
vb
Dim regKey As String = "DevExpress\XtraBars\DockStates\MainState"
DockManager1.SaveLayoutToRegistry(regKey)

'...

DockManager1.RestoreLayoutFromRegistry(regKey)