We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Save Docked state

Hi,
I am using Syncfusion version 4.101.0.58 with .Net 2.0. I have a Form which have three controls that have been docked using DockingManager, User is allowed to change the docking as per his convenience.

Now my requirement is that, user should be able to save the docked state of UI, and when next time he opens up the application i should be able to show the controls in docking state which user has saved.

Thanks,
Abhijeet.


1 Reply

AD Administrator Syncfusion Team August 19, 2008 11:42 AM UTC

Hi Abhijeet,

Thank you for your interest in Syncfusion Products.

The docking windows framework has a fully built-in serialization feature that provides automatic serialization of the form's docking state. In addition to this automatic dock state persistence during application termination and start, multiple intermediate docking states can be saved or loaded anytime using the programmatic API. The serialization mechanism is implemented using the standardized Syncfusion.Windows.Forms.AppStateSerializer component that acts as a central coordinator of all the Essential Tools components and provides the option to read / write to different media such as the default Isolated Storage, XML file, XML stream, Binary file, Binary stream and the Windows Registry.

Please refer below code snippets:
// Load the Save state of the dock.
public void LoadDockState(string fileName, Control ctrl)
{
AppStateSerializer aser = new AppStateSerializer(SerializeMode.XMLFile, fileName);
dockingManager.LoadDockState(aser, ctrl);
}
// Save application current Docking State
public void SaveDockState(string fileName, Control ctrl)
{
AppStateSerializer aser;
aser = new AppStateSerializer(Syncfusion.Runtime.Serialization.SerializeMode.XMLFile, fileName);
dockingManager.SaveDockState(aser, ctrl);
aser.PersistNow();
}

Please refer the below link for more detail.
http://www2.syncfusion.com/ug_63/toolswin/Persistence2.html

Please let me know if any concerns.

Regards,
Hema


Loader.
Live Chat Icon For mobile
Up arrow icon