Skip to main content

DockManager.RestoreFromStream(Stream) Method

Restores the layout in the specified stream to the dock panels.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

[EditorBrowsable(EditorBrowsableState.Never)]
public virtual void RestoreFromStream(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A Stream descendant from which the dock panels’ settings are read. If the specified stream is empty or null (Nothing in Visual Basic), an exception is raised.

Remarks

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

Example

The following code demonstrates how to write and read the docking layout to and from memory.

System.IO.Stream stream = new System.IO.MemoryStream();
dockManager1.SaveLayoutToStream(stream);
// Set the stream pointer to the beginning.
stream.Seek(0, System.IO.SeekOrigin.Begin);

// ...

dockManager1.RestoreLayoutFromStream(stream);
// Set the stream pointer to the beginning.
stream.Seek(0, System.IO.SeekOrigin.Begin);
See Also