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

SaveDockState

Thread ID:

Created:

Updated:

Platform:

Replies:

38936 Dec 21,2005 03:05 PM UTC Dec 18,2008 07:34 AM UTC Windows Forms 3
loading
Tags: Tools
Andrey Gliznetsov
Asked On December 21, 2005 03:05 PM UTC

I don''t want to use PersistSate property. I''ve tried to put this code: _dockingManager.SaveDockState(); AppStateSerializer.GetSingleton().PersistNow(); in OnClosed and in OnClosing method. and in both cases the layout information is not written. But when I put the same code in Form1_DoubleClick event handler information is saved. So, what is the right place to put calling of DockingManager.SaveDockState method?

Vijayanand S [Syncfusion]
Replied On December 21, 2005 03:47 PM UTC

Hi Andrey, NewDockStateEndLoad event and Form Closing event is the better place to load and save the dock state respectively. Do you load your dock state in form load event? If yes, Please call the LoadDockState method in the NewDockStateEndLoad event. This event will trigger after the form load event. Please take a look at the sample and let me know if this meets your requirement. Thank you for using Syncfusion products. Regards, Vijay Test Sample

Administrator [Syncfusion]
Replied On December 12, 2008 04:23 PM UTC

I am using AppStateSerializer.PersistNow in my application for saving docking manager state. (I created an instance of it myself)

- The "DockingManager.SaveDockState" call is made in the FormClosing event of my form
- The AppStateSerializer.PersistNow is called just after.
Due to "class and method" organization the AppStateSerializer.PersistNow was in fact called twice , in this case my file (Xml) was nearly empty (2ko), but when I changed my code for it to be called only once, my file was Ok, trapping in the debugger showed that the second call to "AppStateSerializer.PersistNow" would "damage" the file, the file would pass from 28Ko to 2ko
Any explanations , Have i done something wrong ?




Administrator [Syncfusion]
Replied On December 18, 2008 07:34 AM UTC

Hi Eric,

Sorry for the delayed response.

AppStateSerializer PersistNow() called twice

I am afraid that I was not able to see that the AppStateSerializer PersistNow() method is called twice in debug mode. Please provide me more details and the Essential Studio version you are using.

Please let me know if any concern.

Regards,
Jaya


CONFIRMATION

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.

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

;