Skip to main content
A newer version of this page is available. .
Bar

BarManager.SaveToStream(Stream) Method

Saves the BarManager component’s state to a stream.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v19.2.dll

Declaration

public virtual void SaveToStream(
    Stream stream
)

Parameters

Name Type Description
stream Stream

A stream to which the BarManager componen’st state is saved.

Remarks

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

Example

The following code demonstrates how to write and read a BarManager’s state to/from memory using the System.IO.MemoryStream class.

    System.IO.Stream stream = new System.IO.MemoryStream();
    barManager1.SaveLayoutToStream(stream);
    //set the stream position to the beginning
    stream.Seek(0, System.IO.SeekOrigin.Begin);

    //...

    barManager1.RestoreLayoutFromStream(stream);
    //set the stream position to the beginning
    stream.Seek(0, System.IO.SeekOrigin.Begin);
See Also