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.