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.

How to prevent DockingManager from saving state automatically?

Thread ID:

Created:

Updated:

Platform:

Replies:

92324 Jan 5,2010 10:31 AM Jan 6,2010 07:05 AM Windows Forms 2
loading
Tags: Tools
Razvan Herdea
Asked On January 5, 2010 10:31 AM


I am setting the PersistState = false and still DockingManager saves the state to the serializer when the form is closing.
I am using AppStateSerializer as a singleton, with binary file mode.
I can prevent this from happening by disabling the serializer, but I am hoping there is a way to have the DockingManager save state only when I call SaveDockState().

Thanks with anticipation

Razvan

Administrator [Syncfusion]
Replied On January 6, 2010 04:53 AM

I've never seen it do what you want, why would you keep the serializer open when your are not using it?

I just have a load and save rountine that creates the serializer and then loads/saves, no need to keep a handle to the serializer at all.

ie


Dim memOutput As New IO.MemoryStream()
Try
Dim objDockSerializer As New Syncfusion.Runtime.Serialization.AppStateSerializer(Syncfusion.Runtime.Serialization.SerializeMode.XMLFmtStream, memOutput)
If TabbedManager Then
MainForm.TabbedMDIManager.SaveTabGroupStates(objDockSerializer)
Else
MainForm.DockingManager.SaveDockState(objDockSerializer)
End If
objDockSerializer.PersistNow()
Return memOutput.GetBuffer()
Catch ex As Exception
Return Nothing
Finally
'Always attempt to close the memorystream
Try
memOutput.Close()
Catch
End Try
End Try


Githanjali S [Syncfusion]
Replied On January 6, 2010 07:05 AM

Hi Razvan,

Please refer to the sample attached.

In the sample only when the PersistState=true the DockingManager saves the state to the serializer.

Please let me if you have any questions.

Regards,
Githanjali



Sample_c88db64b.zip

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.

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.

;