Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
140
Detect if the ToolWindow gets closed or just re-docked
posted

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

Parents
  • 138253
    Offline posted

    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.

Reply Children