XamDockManager -- Save and Load Layouts

[Infragistics] Andrew Flick / Saturday, February 28, 2009

Save Layout

using System.IO;
...
using (FileStream fs = new FileStream("layout.xml", FileMode.Create, FileAccess.Write))
{
    this.xamDockManager1.SaveLayout(fs);
}
...

Load Layout

using System.IO;
...
//Load the layout from a stream
using(FileStream fs = new FileStream("layout.xml", FileMode.Open, FileAccess.Read))
{
    this.xamDockManager1.LoadLayout(fs);
}
....

//Handle the InitializePaneContent event to add content to missing panes
private void xamDockManager1_InitializePaneContent(object sender, InitializePaneContentEventArgs e)
{
    //TODO: Add content to the missing content pane using the e.NewPane object
}