Restores the control layout stored at the specified system registry path.
public virtual void RestoreLayoutFromRegistry( string path )
Public Overridable Sub RestoreLayoutFromRegistry( path As String )
A string value specifying the system registry path.
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".
The Tree List options that are restored are identified by the TreeList.OptionsLayout object.
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.
The following sample code demonstrates how to save the layout of the Tree List control to the registry and then restore it. The TreeList.SaveLayoutToRegistry and TreeList.RestoreLayoutFromRegistry methods are used for this purpose.
string registryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\DevExpress Inc\\TreeListLayout"; treeList1.SaveLayoutToRegistry(registryPath); treeList2.DataSource = treeList1.DataSource; treeList2.RestoreLayoutFromRegistry(registryPath);