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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to save panel docking states?

Thread ID:





146002 Jul 17,2019 06:38 AM UTC Jul 18,2019 06:55 AM UTC WinForms 1
Tags: DockingManager
Rafal Pawlowski
Asked On July 17, 2019 06:38 AM UTC

I have simple application using docking manager. I want to save panels positions and docking states (eg. panels being docked together in one window). How to do it? I try to call SaveDockState to save it to xml file, but it is never created and panels' positions are reset every time.

Attachment: docking_manager_test_b238858c.zip

Jagadeesan Pichaimuthu [Syncfusion]
Replied On July 18, 2019 06:55 AM UTC

Hi Rafal, 
Thanks for using Syncfusion product. 
We have checked the provided sample and we have modified the sample to achieve your requirement. Please refer the below code snippet and sample for your reference. 
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.XMLFile, "test"); 
public Form1() 
    this.dockingManager1.PersistState = true; 
    dockingManager1.HostControl = this; 
    this.dockingManager1.SetEnableDocking(uc1, true); 
    this.dockingManager1.SetEnableDocking(uc2, true); 
    this.dockingManager1.SetDockLabel(uc1, "control 1"); 
    this.dockingManager1.SetDockLabel(uc2, "control 2"); 
    this.dockingManager1.SetDockVisibility(uc2, true); 
    this.dockingManager1.SetDockVisibility(uc1, true); 
    this.dockingManager1.SetDockVisibility(uc2, true);        
protected override void OnClosing(CancelEventArgs e) 
And you can refer the below documentation for your reference. 
Let us know whether this helps also if you need any further assistance on this. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon