New to Telerik UI for WinForms? Start a free 30-day trial
Save and Load Layout
Updated over 6 months ago
As of R2 2021 SP1 RadPanorama supports Save/Load layout functionality. The Save/Load layout functionality gives your applications the opportunity to preserve user panorama settings such as tile elements order and restore them later. Those layout settings are written in a XML file.
Here is a sample demonstrating how you can implement a Save Layout button event handler:
Save layout
C#
private void SaveButton_Click(object sender, EventArgs e)
{
string s = "default.xml";
SaveFileDialog dialog = new SaveFileDialog();
dialog.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
dialog.Title = "Select a xml file";
if (dialog.ShowDialog() == DialogResult.OK)
{
s = dialog.FileName;
}
this.radPanorama1.SaveLayout(s);
}
The code snippets below demonstrates how you can implement a Load Layout button event handler:
Load layout
C#
private void LoadButton_Click(object sender, EventArgs e)
{
string s = "default.xml";
OpenFileDialog dialog = new OpenFileDialog();
dialog.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*";
dialog.Title = "Select a xml file";
if (dialog.ShowDialog() == DialogResult.OK)
{
s = dialog.FileName;
}
this.radPanorama1.LoadLayout(s);
}