Skip to main content

LayoutControl.SaveLayoutToRegistry(String) Method

Saves the current layout to the specified system registry path.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v22.2.dll

NuGet Package: DevExpress.Win.Navigation


public virtual void SaveLayoutToRegistry(
    string path


Name Type Description
path String

A String value that specifies the system registry path to which to save the layout.


The path parameter can be one of the following strings:

  • A full registry path. For example, “HKEY_LOCAL_MACHINE\Software\MyCompany\MyProject".
  • A partial registry path. For example, “Software\MyCompany\MyProject". In this case, the full path is “HKEY_CURRENT_USER\Software\MyCompany\MyProject".

Use the LayoutControl.RestoreLayoutFromRegistry method to restore a saved layout.

See Save and Restore Layout to learn more.


You can utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls at once.


The following sample code can be used to write and read the layout to/from the system registry. The full path for the layout will be: HKEY_CURRENT_USER\DevExpress\Layout Control\Layouts.

string regKey = "DevExpress\\Layout Control\\Layouts";

// ...

See Also