TreeList.RestoreLayoutFromRegistry(String, OptionsLayoutBase) Method

Restores the control’s layout stored at the specified system registry path, using the specified options.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v21.2.dll


public virtual void RestoreLayoutFromRegistry(
    string path,
    OptionsLayoutBase options


Name Type Description
path String

A string value specifying the system registry path.

options OptionsLayoutBase

An OptionsLayoutTreeList object that specifies which Tree List options must be restored. Or a OptionsLayoutBase.FullLayout object, to restore all the settings.


Use the RestoreLayoutFromRegistry method to restore the TreeList’s layout, written to the system registry by the TreeList.SaveLayoutToRegistry method.

The control’s layout is restored from the path specified by the path parameter. You are allowed to define whole and partial registry keys. For instance, if you define a partial key, “Software\MyCompany\MyTool" the full path will be as follows: “HKEY_CURRENT_USER\Software\MyCompany\MyTool". If you wish to store a layout in another root key, you should define the entire path, for instance: “HKEY_LOCAL_MACHINE\Software\MyCompany\MyTool".


When restoring a layout during a form load (for instance, in your Form.Load event handler), you may need to call the TreeList.ForceInitialize method prior to the layout restoration. See this method to learn more.

See Also