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

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

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");


5 Replies

ST Saravanan T Syncfusion Team 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.

Saravanan T

SL Sergei Leschinksy 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


SK Senthil Kumaran Rajan Syncfusion Team 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.


SL Sergei Leschinksy 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.


SK Senthil Kumaran Rajan Syncfusion Team 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.



Live Chat Icon For mobile
Up arrow icon