Hello,
I'd like to handle the floating ToolWindow's closing event the same way as the tabbed ContentPane (the tabbed ContentPanes have a close button which is bound to a ICommand reference)
To achieve this, I hook to the
XamDockManager.ToolWindowLoaded
event where I hook to the
ToolWindow.Closing
event.
So my question is: Is there a solution to detect if the ToolWindow gets closed due to closing via button or due to docking back into the XamDockManager.
Or is there maybe another solution to achieve the handling of closing the tabs?
Thanks in advance
Christian
Hello Christian,
Thank you for your post. I have been looking into it and I can suggest you add the following check in the ToolWindow’s Closing event handler in order to determine whether it is closed or docked:
if (((sender as PaneToolWindow).Content as SplitPane).IsVisible) { Debug.WriteLine("Closed"); } else Debug.WriteLine("Docked");
Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Stefan,
how can I get access to my user control that was inside a window? Basically, I want to display additional section when it is undocked and hide it when it is docked again. It seems like it's already not a child of PaneToolWindow when Closing event is fired.