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.

Load/SaveDockState problems (with 4.3)

Thread ID:

Created:

Updated:

Platform:

Replies:

51886 Nov 15,2006 07:54 PM Feb 2,2007 12:52 PM Windows Forms 8
loading
Tags: Tools
Jonathan Quail
Asked On November 15, 2006 07:54 PM

I am experiencing an issue with the Save/Load Dock state functionality of the Docking Manager.

We were using Syncfusion 4.2.0.37 before – and this worked perfectly. But now we have upgraded to 4.3.0.30 and it is not working at all. We are also using VS2005 and .NET 2.0

We are handling the persisting of dock states ourselves (specifically, our code looked like this)

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.SaveDockState (serializer, control1);
dockingManager.SaveDockState (serializer, control2);
dockingManager.SaveDockState (serializer, control3);
serializer.PersistNow ();
stream.Close ();

When we wanted to retrieve the state, we would do so like this:

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.LoadDockState (serializer, control1);
dockingManager.LoadDockState (serializer, control2);
dockingManager.LoadDockState (serializer, control3);
stream.Close ();

As I said – that was working up until today when we upgraded to 4.3. Now, all of those “LoadDockState ()” calls return true – but they place those controls in a very unstable state. Where if you try to move one even a pixel, it crashes the application.

I tried to re-create the issue in a separate application, and was unable. I did come across other samples where the code to save/load looks like this:

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.SaveDockState (serializer);
serializer.PersistNow ();
stream.Close ();

AppStateSerializer serializer = new AppStateSerializer (SerializeMode.BinaryFmtStream, stream);
dockingManager.LoadDockState (serializer);
stream.Close ();

I was able to get this working perfectly in my sample application (the output state file was 9kb in size). But when I tried the approach in the main application – the file that is output was 1kb, in fact – it is actually about 737 bytes. When the “LoadDockState (serializer)” is called – it returns false.

I looked in the Release Notes for 4.3 and did see some changes to the Docking State stuff.

Have you seen anything like this? Or know why the output binary file would only be 1kb – it is as if the “SaveDockState (serializer);” call is saving out a blank dock state. But I don’t understand why it would not work here, but work in another application.

I will try to find a way to reproduce it in a smaller application tomorrow and will post it if I can. Any suggestions or ideas would be most welcome!

Jonathan

Malarvizhi [Syncfusion]
Replied On November 15, 2006 11:16 PM

Hi Jonathan,

Sorry for the inconvenience caused.
This is a known issue in 4.3.0.30.We have fixed the issue internally and our next release 4.4 will contain the bug fix.

Thanks for choosing Syncfusion products.

Regards,
Malarvizhi.

Administrator [Syncfusion]
Replied On January 24, 2007 04:27 PM

I get the same problem in 4.4 - not so much the crashing, but the SaveDockState always seems to save a small file and the LoadDockState always returns false.

Murugan [Syncfusion]
Replied On January 24, 2007 05:47 PM

Hi Mark,

I am afraid, we could not reproduce the issue here. Herewith I have attached the sample that I have used to check the issue here. Please have a look at the sample and let me know if I have missed anything.

TDM_Dockstate

Thanks,
Murugan P.S

Administrator [Syncfusion]
Replied On January 25, 2007 01:11 PM

Thanks Murugan.
I can't repro the issue in your example. But I'm still not sure why it's not workig in mine.
I thought it might have been the timing of when I'm Loading/Saving the dock state (eg: controls not completely constructed or something) - but even when I do it using some buttons the LoadDockState method always returns false.
I wonder if it might be a property I've set on the dockingManager or maybe it's the type of controls that I'm trying to dock (one is a TreeView).

Murugan [Syncfusion]
Replied On January 25, 2007 02:02 PM

Hi Marc,

Sorry for the inconvenience caused. We have tried to reproduce the issue here. But we could not reproduce the issue. Could you please send us the sample having the issue? This will help us to analyse the issue further. Before sending,
Please delete all files from IsolatedStorage

C:\Documents and Settings\loginname\Local Settings\Application Data\IsolatedStorage

and try to run the sample. Please let me know if it helps you.

Thanks,
Murugan P.S

Administrator [Syncfusion]
Replied On January 25, 2007 05:40 PM

Hi Murugan.
Thanks for the resply. I'll try and send a sample that reproduces the issue but it might be hard - I can't repro it in your code. It seems to work fine. It's just happening in my, rather large, application so I'm pretty sure it's something I'm doing that's messing it up. I'm just having a hard time figuring out what.
Mark

Administrator [Syncfusion]
Replied On February 2, 2007 12:44 PM

I think I figured out my issue with the DockingManager.
The controls being docked had their Name property set to "". It looks like the serialization of the dock state depends on the name to set some kind of key.

Murugan [Syncfusion]
Replied On February 2, 2007 12:52 PM

Hi Mark,

Thanks for your update.

You are correct. Serialization depends on the control name. Name has to be set for all docked controls.

Regards,
Murugan P.S

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.

;