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
1830
EventTrigger for Contentpane Closing
posted

I'm using MVVM and I need to be able to cancel contentpane close events in a viewmodel class.  Originally I thought to use a HeaderTemplate with my own close button, but there are a few scenarios where the stock close button will still show up in a floating window, even if you turn it off with CloseButtonVisibility, and I don't want to re-template any of the DockManager controls.  The goal is to handle the closing event for all panes in the viewmodel.  Therefore, I'm wondering if I can set up an interaction trigger to invoke a command action for the contentpane's closing event.

Does anyone know how to do this? Any other ideas for a complete MVVM-style contentpane close architecture are also welcome.  Thanks.