Hello. I've attached a project that is laid out the same as my main project to illustrate my issue. What I want is keep the same layout of panes as I switch from user control to user control. The problem is that that is not happening initially when I go from view 3 (default view when application starts) to view 4. When I switch between different views the layout of the previous view is saved and then that layout is loaded for the next view so it should work.
Just to be clear of the steps:
1.start the application. The North pane is pinned and South pane is unpinned.
2.Click on "View 4" on the left hand side. Now both South and North panes are pinned but the layout should be the same as in "View 3".
Please have a look at the project and this will make sense.
Thanks
Hello KrisVice,
I have received an update from our development teams on this matter. The behavior you are currently seeing is actually expected behavior of the control, and this is because of where you are saving your XamDockManager layouts.
Currently, in the sample project you have sent me, you are saving the layout in the Unloaded event of the XamDockManager. At this point, everything would work normally if you hadn't bound the IsPinned property on your panes. Just before the Unloaded event fires, the data context of the XamDockManager is cleared, which we do not control as this happens with WPF. The IsPinned value on the ContentPanes defaults to true, and so when the save layout gets called in the Unloaded event, it saves IsPinned = true for each of the panes that have that property bound. Then, it loads that property in the next view, which is why you are seeing the behavior you are seeing.
You may want to consider hooking the DataContextChanged event instead, and try saving the layout from there, as long as you don't continue saving within the unloaded event, as this may step on the save you are implementing in the DataContextChanged event.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thanks for the reply.
I've have a workaround working based on your suggestion.
Thank you for your post.
I have been investigating into this issue you are seeing, and I have reproduced it. It appears that neither the binding on IsPinned property on the panes or the loading of the layout is being respected when changing the views in your application initially. After the View 4 has been loaded the first time though, it appears that everything loads correctly and the bindings on the IsPinned property are respected.
As this behavior is rather unexpected, I have asked our engineering staff to examine it further. To ensure that it receives attention, I have logged this issue in our internal tracking system with a development ID of 211034. I have also created you a case on this matter so that you can track the information about this development issue. This case has an ID of CAS-167436-F1V9X9 and you can access it here: https://ko.infragistics.com/my-account/support-activity.
For the time being, as a workaround, I would recommend that on the first time that your second view is loaded, that you evaluate the property that is bound to the IsPinned property on your panes and programmatically set that status for the IsPinned properties on your panes rather than relying on the layout being loaded for this to happen. This should force the ContentPanes in the newly loaded view to have the same IsPinned behavior as the one in your previous view. I had also tested your application with floating panes and pane dock position and everything seems to work fine with the layout loading on those ends. This appears to be specific to the IsPinned = false bit.