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
close icon

Docking manager deserialization changes control size

Hi,
I used syncfusion to dock a few controls on form. I serialized and deserialized the dock state using app serializer, to retain the same control docking / layout.
The number of controls in form could be different than that at the time of deserialization.

Sometimes when I deserialize, some of the control's height changes to 0 or very small value. This happens even with same number of controls as at the time of serialization.

Anybody observed something like this? Any suggestion to resolve this?

code snippet:
serialization:
...
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memstream);
SaveDockState(serializer);
...
deserialization:
...
AppStateSerializer serializer = new AppStateSerializer(SerializeMode.BinaryFmtStream, memstream);
foreach (Controls c in form)
SetEnableDocking(c, true);
SetDockVisibility(c, true);
SetDockLabel(c, c.Name);

LoadDockState(serializer);
...
Right after the loaddockstate call, I can see that the size is corrupted.
------

Thanks in advance on your suggestions.
Regards,
VS


5 Replies

SK Senthil Kumaran Rajan Syncfusion Team December 2, 2014 10:32 AM UTC

Hi VS,

 

Thank you for using Syncfusion product,

 

We regret to let you know that we are unable to reproduce the reported behavior. We have prepared a sample for your reference and it is attached below. Please check whether we have followed the same steps to reproduce the reported behavior, If not please share a sample or a reproducing steps. That will be helpful for us to analyze and provide you a prompt solution as earlier as possible.

 

Please let us know if you are facing the issue still.

 

Regards,

R.Senthil kumaran


Attachment: Binaryfrmt_67cd3ff0.zip


VS vs December 3, 2014 03:31 PM UTC

Hi,

I have checked the app that you shared and I am working on reproducing the issues.

In my case I have a few controls which are created at runtime, they are not present in form during design. Do they need any special handling?

Regards,
VS


AJ Ashwini Jaya Preetha Durai Samy Syncfusion Team December 4, 2014 12:15 PM UTC

Hi VS,

 

Thank you for the update,

 

I have checked the app that you shared and I am working on reproducing the issues.

We will wait until we hear from you

In my case I have a few controls which are created at runtime, they are not present in form during design

We request you to confirm us whether your requirement is to save the Docked controls state which are generated in run time. If so it can be achieved by using the PersistState property.

 

This property enables user to save the docked controls state and load the saved dock state once Form is reloaded. Please refer the below code snippet.

Code snippet[C#]:

this.dockingManager1.PersistState = true;

 

Documentation Link: http://help.syncfusion.com/ug/windows%20forms/documents/dockstatepersistence.htm

 

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/131634/docking_manager548526747.zip     

 

 

 

 

 

Please let us know if we have misunderstood your query,

 

Regards,

Ashwini



VS vs December 5, 2014 11:07 AM UTC

Hi,
My need is different. It is NOT to have the last arrangement and have it back on next start.

I want to arrange my controls, some of which are dynamically created at runtime, and save the arrangements to disk. I may use that arrangement later, I may give the saved file to another person's use to have the same arrangement/orientation on a different machine.

When I load the file back, some times some of the control's size is different.

Regards,
VS


AJ Ashwini Jaya Preetha Durai Samy Syncfusion Team December 9, 2014 05:57 AM UTC

Hi VS,

 

Thank you for the update,

 

We have prepared a sample using AppStateSerialization as per the mentioned requirement.  We could able to notice the size change in docked control while loading the saved changes and also captured a video while testing.

 

Sample Link: http://www.syncfusion.com/downloads/support/directtrac/131841/Docking36334286.zip

Video Link: http://www.syncfusion.com/downloads/support/directtrac/131841/Docking_manager-2027973076.zip

 

Please have a look at the video and confirm us whether this is the reported behavior, if not please share us the reproducing steps with the given sample. Upon your confirmation we will provide you the details.

 

Please let us know if you need further assistance,

 

Regards,

Ashwini 


Loader.
Live Chat Icon For mobile
Up arrow icon