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
Cancel ContentPaneCommands.Close
posted

When executing ContentPaneCommands.Close, the handler for the closing event of the pane can cancel the event.  I need to know if there is a way to dig out the cancellation of that event from the code that executes ContentPaneCommands.Close, which returns a boolean that is not related to cancellation of the Closing event.

 

              void Window_Closing(object sender, CancelEventArgs e)

              {

                   foreach (var pane in dockManager.GetPanes(PaneNavigationOrder.VisibleOrder))

                        pane.ExecuteCommand(ContentPaneCommands.Close);

                  // need ability to detect cancellation  from Closing event below and issue e.Cancel = true here

                }

 

               void Pane_Closing(object sender, PaneClosingEventArgs e)

              {

                     // for whatever reason ...

                    e.Cancel = true;

              }