Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SchedulerControl.SaveLayoutToStream(Stream) Method

Saves the control’s layout to the specified stream.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

NuGet Package: DevExpress.Win.Scheduler

#Declaration

public void SaveLayoutToStream(
    Stream 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.

#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