Back to Devexpress

DockManager.SaveToStream(Stream) Method

windowsforms-devexpress-dot-xtrabars-dot-docking-dot-dockmanager-dot-savetostream-x28-system-dot-io-dot-stream-x29.md

latest2.7 KB
Original Source

DockManager.SaveToStream(Stream) Method

Saves the layout of dock panels to a stream.

Namespace : DevExpress.XtraBars.Docking

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual void SaveToStream(
    Stream stream
)
vb
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Sub SaveToStream(
    stream As Stream
)

Parameters

NameTypeDescription
streamStream

A Stream descendant to which the layout of the dock panels is written.

|

Remarks

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

Example

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

csharp
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);
vb
Dim stream As System.IO.Stream
stream = New System.IO.MemoryStream()
DockManager1.SaveToStream(stream)
' Set the stream pointer to the beginning.
stream.Seek(0, System.IO.SeekOrigin.Begin)

' ...

DockManager1.RestoreFromStream(stream)
' Set the stream pointer to the beginning.
stream.Seek(0, System.IO.SeekOrigin.Begin)

See Also

SaveToRegistry(String)

SaveToXml(String)

Saving and Restoring the Layout of Dock Panels

DockManager Class

DockManager Members

DevExpress.XtraBars.Docking Namespace