Note
When restoring a layout during a form load (for instance, in your Form.Load event handler), you may need to call the ForceInitialize method prior to the layout restoration. See this method to learn more.
For more information, see Saving and Restoring the Layout of Dock Panels
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.
C# |
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)
|