DockManager.RestoreFromStream(Stream) Method

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

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

public virtual void RestoreFromStream(
    Stream stream
)
Public Overridable Sub RestoreFromStream(
    stream As 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.

Examples

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