A newer version of this page is available. Switch to the current version.

SchedulerControl.SaveLayoutToStream(Stream) Method

Saves the control's layout to the specified stream.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v19.1.dll

Declaration

public void SaveLayoutToStream(
    Stream stream
)
Public Sub SaveLayoutToStream(
    stream As Stream
)

Parameters

Name Type Description
stream Stream

A Stream descendant to which the control's layout is written.

Remarks

The SaveLayoutToStream method saves the control's layout (the settings of all the Views, the type of the active View, grouping mode, etc) to the specified stream. The saved settings can then be restored from the storage using the SchedulerControl.RestoreLayoutFromStream method.

TIP

You can utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls at once.

Examples

The following example demonstrates how to save a scheduler's layout to a memory stream and then restore it.

using System.IO;
// ...

Stream stream = new MemoryStream();
// ...

// Save the scheduler's layout.
stream.Seek(0, System.IO.SeekOrigin.Begin);
schedulerControl1.SaveLayoutToStream(stream);

// Load the scheduler's layout.
stream.Seek(0, System.IO.SeekOrigin.Begin);
schedulerControl1.RestoreLayoutFromStream(stream);

Implements

DevExpress.Utils.Serializing.ISupportXtraSerializer.SaveLayoutToStream(Stream)
See Also