Back to Devexpress

DockManager.SaveToRegistry(String) Method

windowsforms-devexpress-dot-xtrabars-dot-docking-dot-dockmanager-dot-savetoregistry-x28-system-dot-string-x29.md

latest3.0 KB
Original Source

DockManager.SaveToRegistry(String) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Saves the layout of the dock panels to the registry.

Namespace : DevExpress.XtraBars.Docking

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual bool SaveToRegistry(
    string path
)
vb
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Function SaveToRegistry(
    path As String
) As Boolean

Parameters

NameTypeDescription
pathString

A string value specifying the registry path at which to save the layout.

|

Returns

TypeDescription
Boolean

true if the operation is successfully completed; otherwise, false.

|

Remarks

This method is obsolete. Use the DockManager.SaveLayoutToRegistry method instead.

Example

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)

See Also

SaveToStream(Stream)

SaveToXml(String)

RestoreFromRegistry(String)

Saving and Restoring the Layout of Dock Panels

DockManager Class

DockManager Members

DevExpress.XtraBars.Docking Namespace