Our application does analysis on the current map. When the user clicks on the button to start up our tool, we have the code:
var mv = MapView.Active;
MainWindow frm1 = new MainWindow();
frm1.MainMapView = mv;
Where MainWindow is where the use can run different analysis. This works great till the user either loads a new project or goes to another map in the current project. The variable mv is understandably still referencing the original active map if the user has not closed the MainWindow. Is there a way to capture the event when the map or project does change?
I think this might be similar to: https://community.esri.com/thread/226083-notification-of-active-edit-template-change, but there was no response to it.