SchedulerControl.SaveLayoutToStream(Stream) Method
Saves the control’s layout to the specified stream.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.2.dll
Declaration
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.
Example
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);
See Also