How do you cancel a ToolWindowPane or Visual Studio IDE close operation via a VSPackage?
问题 I have a VSPackage with a dockable tool window containing form data. If there are unsaved changes in this form, I would like to cancel a close to either the tool window and the visual studio IDE if the user clicks cancel on saving changes before closing. I can perform the save test on close, but I don't see any event handler methods or other options to actually cancel the close. Here is some blurb from the package: private DTE2 _applicationObject = null; ///-----------------------------------