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

Load / Save state doesnt work

I made a page with DockingManager only. I call docking.LoadDockState(); in the page constructor and docking.SaveDockState(); in OnNavigatingFrom.

I add few controls and change layout of the docked parts, then I navigate to the previous page and then back to the docking page. It appears blank. I would expect to see the stored layout.

I add user controls in the code if user presses a context menu like this (Part1Part is a UserControl):

            FrameworkElement fe = null;
            fe = new Part1Part();
 
            docking.Children.Add(fe);
            SfDockingManager.SetDockState(fe, DockState.Float);
            SfDockingManager.SetCanFloat(fe, true);

Please tell why is this not working?

Also - you really should have an overloaded method for Load/Save State methods - to accept/return a IO stream - because its the obvious step - save the state in the db or manipulate in whichever way necessary.


1 Reply

MS Marimuthu Sivalingam Syncfusion Team April 17, 2017 12:54 PM UTC

Hi Volodymyr,

Thank you for contacting Syncfusion Support.

We have checked the reported query "". SfDockingManager control loads the saved state of SfDockingManager correctly, when the children collection matches with the Saved state file. You can save and load the dynamically added children by changing its state until recreate the instance of SfDockingManager. While perform navigation operation every time, SfDockingManager instance is newly created and dynamically added children are removed from the children collection of DockingManager. SfDockingManager will load only the current children Collection, But in you sample all the children are added dynamically, so SfDockingManager appears blank.

Query: "Should have an overloaded method for Load/Save State methods"

We were logged feature report regarding this. You can follow up the updates for this feature report in incident created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

Regards,
Marimuthu S.


Loader.
Up arrow icon