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.

How can the initial design state be loaded by the DockingManager LoadDockState?

When the DockingManager loads the initial designer state by using the LoadDockState() method at the loaded event of the DockingManager, it reloads the last saved state of the DockingManager instead of the initial designer state.

To reload the initial designer state of the DockingManager, load the state of the DockingManager by invoking the LoadDockState() method by using the Dispatcher with the DispatcherPriority as the Background.

The following code example explains the same:

C#

 

XAML

 

The following screenshot shows the initial designer state of the DockingManager.

Figure 1: Initial designer state

The following screenshot shows the loaded state of the DockingManager with some changes in the state of the DockingManager:

Figure 2: Loaded state of the DockingManager

 

The following screenshot shows that the initial designer state of the DockingManager reset on pressing the ResetState Button.

Figure 3: Initial designer state of the DockingManager reset

Article ID: Published Date: Last Revised Date: Platform: Control: Product Version:
4500 04/19/2015 04/19/2015 WPF DockingManager 12.4.0.24
Did you find this information helpful?
Comments
Lautas Nicolae Oct 27, 2017

When dynamically add a new ContentControls to DokingManager and save  the state, when re-run the code, the DokingManager have the initial defined ContentControls and layout. (Ignore all others ContentControls addded dynamically even was saved on close app and load on start up. This is bug ?)

Reply
Durga Rajan [Syncfusion] Oct 30, 2017

Hi Lautas Nicolae,

 

No, this is the default behavior of the DockingManager control. DockingManager will load the Dock Windows from the current children collection and it will not persist the dynamically added children. DockingManager cannot de-serialize its saved layout properly, when the children collection of DockingManager is changed dynamically after persisting the layout.

 

Please refer the below link:

https://help.syncfusion.com/wpf/dockingmanager/state-persistence#serialize-the-dynamically-added-children

 

Regards,

Durga S.

Add Comment
You must log in to leave a comment

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.