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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DockingManager.SaveDockState silently fails if one of the docked controls doesn't have name

Thread ID:

Created:

Updated:

Platform:

Replies:

118863 Apr 16,2015 06:13 PM UTC Apr 21,2015 07:11 AM UTC WinForms 5
loading
Tags: DockingManager
Sergei Leschinksy
Asked On April 16, 2015 06:13 PM UTC

Hi, like said in a title, DockingManager.SaveDockState writes half empty file if one of the controls that were docked doesn't have name.  Below is the code to reproduce the issue. Obviously it would be problematic to restore state for this control. But perhaps the situation could be handled better: either by throwing an exception or ignoring this particular control. BTW, some inner feeling tells me that such exception is thrown but then suppressed by empty try - catch block. Just to let you know, since it may cost time for other people.

var panel = new Panel();
            
// without this line it silently fails
//panel.Name = "panel1";
            
dockingManager1.SetEnableDocking(panel, true);
dockingManager1.DockControl(panel, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Left, 200);

var sr = new AppStateSerializer(SerializeMode.XMLFile, @"d:\docklayout.xml");
dockingManager1.SaveDockState(sr);
sr.PersistNow();

Regards,
Sergei

Saravanan T [Syncfusion]
Replied On April 17, 2015 06:05 PM UTC

Hi Sergei,

Thank you for using Syncfusion products.

We would like to let you know that, In DockingManager serialization/deserialization functionality has been implemented based on docked control name. So, it is necessary for docked control to have a name defined. Hence, this reported notification exception is raised.

Please let us know if you need any further assistance.

Regards,
Saravanan T

Sergei Leschinksy
Replied On April 18, 2015 03:24 PM UTC

Thanks, I already realized that name is needed. But the issue is that exception IS NOT RAISED when there is no name. At least on my machine with suite version 12.4.0.24.

Regards,
Sergei

Senthil Kumaran Rajan [Syncfusion]
Replied On April 20, 2015 02:05 PM UTC

Hi Sergei,

Thank you for your update.

We hope, you have missed to enable exception notification in Visual Studio, once it is enabled mentioned exception will be raised. We have prepared a video for your reference and it can be downloaded from the following location.

Video Location : http://www.syncfusion.com/downloads/support/forum/118863/Dockingmanager-1209158941.zip

Please let us know if you need further assistance.

Regards,
Senthil

Sergei Leschinksy
Replied On April 20, 2015 02:17 PM UTC

Thanks, that was silly of me. Of course it will be raised. Was too tired with other issue when created this. Sorry.

Regards,
Sergei

Senthil Kumaran Rajan [Syncfusion]
Replied On April 21, 2015 07:11 AM UTC

Hi Sergei,

Thank you for your update.

We are glad to hear that the provided solution meets your requirement.

Please let us know if you need any further assistance on this.

Regards,

Senthil.


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

;