Is there a way to restore a PaneToolWindow back to the location from where it was dragged? For example, imagine that I have a PaneToolWindow (or a DocumentContentHost for that matter) that has three panes, and one is docked on the right side. I drag out the one that is on the right side and maximize it. Then the user clicks some button (maybe the close button) on the maximized pane and it returns back to its exact position docked on the right side of the PaneToolWindow it was dragged from.
Is there a way to do this?
Thanks in advance.
Yes, we resolved it. My requirement was for the user to be able to quickly maximize a view and then quickly restore it. Instead of having it maximize in a new window, I made it maximize the contents of the pane within its current window.
Thanks for following up.
Adam
Hello adamallen,
I am just checking have you been able to resolve your issue? If you still need any assistance on the matter do not hesitate to ask.
You can handle the PaneDragStarting event of the XamDockManager. This way you will be able to get all of the information of the dragged pane that you need in its handler. For example you can get the PaneLocation as follows:
((PaneHeaderPresenter)(e.RootPane)).Pane.PaneLocation.ToString();
Once you get the information about the initial location of the panes you will be able to restore it any time.
Another approach that you may try is the save and load of the layouts:
http://help.infragistics.com/Help/NetAdvantage/WPF/2012.1/CLR4.0/html/xamDockManager_About_Saving_and_Loading_Layouts.html
If you have any additional questions on this matter please feel free to ask.