I’m working on an ArcMap 10.2 add-in which runs as a C# WPF application. I’ve linked the add-in window as a child owned by the ArcMap window so it will close when ArcMap is closed (among other properties) by following this procedure. My issue is that I need to prompt to save changes to work done in the add-in before closing ArcMap, as now it just forcefully closes it.
I do want to mention this is not asking how to save the changes. My add-in already prompts for saving when closing normally (closing the add-in window). However it seems that as an owned window my shutdown procedure is not followed, and it is forcefully closed.
I thought I could make an ArcMap class extension as described here, but I’m not having much luck. Ideally I would like to add my add-in closing sequence to the already existing ArcMap closing sequence (prompt add-in to save, prompt ArcMap to save, shutdown) as a callback.
I should also not that my add-in window doesn’t have to be owned by ArcMap, if there is a better way to do this without ownership.
I would also like to apologize as I cannot post any code as what I’m working on is proprietary, but I will try to clarify any ambiguities as much as possible.
Can anyone point me in the right direction?
Thanks!