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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DockingManager loading from persisted state

Thread ID:





80282 Mar 26,2009 02:34 PM UTC Mar 27,2009 06:57 PM UTC WinForms 3
Tags: Tools
Henry Thacker
Asked On March 26, 2009 02:34 PM UTC


I saw this post: http://www.syncfusion.com/support/kb/tools/Default.aspx?ToDo=view&questId=9

But unfortunately I can not attach to this event, as loading from the persisted state ends up calling this in an infinite loop. Is there any other event I can attach to, or can you post a sample showing what the code should look like to acheive loading a persisted state with no user input??



Fathima Shalini P [Syncfusion]
Replied On March 27, 2009 07:37 AM UTC

Hi Henry,

Thank you for your interest in Syncfusion Products.

The NewDockStateEndLoad event occurs immediately after a new dock state has been loaded. Whenever an application with one or more docked controls is loaded this event will be triggered more than once and this causes calling infinite loop when loading dock state. To avoid this we need to use the flag variable that allows the docking manager to load the docking state only once.

Kindly refer to the code snippet that illustrates this:

bool flag = false;
private void dockingManager1_NewDockStateEndLoad(object sender, EventArgs e)

if (flag == false)
flag = true;


Please let me know if any concerns.


Henry Thacker
Replied On March 27, 2009 09:31 AM UTC

Unfortunately m_dockingManager_NewDockStateEndLoad never seems to get called for me... I have definitely attached the event, and I load several depersisted controls into the dockmanager when the form loads, but it still never fires.

Mano J [Syncfusion]
Replied On March 27, 2009 06:57 PM UTC

Hi Henry,

Can you try the Form's Shown event?

this.Shown += new EventHandler(Form1_Shown);
void Form1_Shown(object sender, EventArgs e)
// load the state here.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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