Skip to main content

How to: Save and Restore a Layout

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);