This has been discussed in an older post from years ago, but there really wasn't an answer as far as I can tell. I am trying to port over an ArcObjects extension which listens for OnStartEditing and OnStopEditing. When an edit session begins, many checks happen including figuring out the layers in the map, pulling data from the database, and if the appropriate datastores are connected to specific layers - all for the purpose of triggering certain things through the edit session. Having the ability to know when to begin listening for all these things would be super helpful with an OnStartEditing event listener.
The previous post mentioned listening for a custom tool activation event, but what happens if a user edits a geometry without activating the tool? The extension I am porting over listens for geometry changes too in which an OnStartEditing event listener would be able to prepare for.
One possibility I am thinking through is to listen for the esri_editing_editingCurrently and esri_editing_editingNotAvailable states. If I could be notified of these states being in the ArcPro session, I could use them like the OnStartEditing and OnStopEditing events. The issue is, I'm not sure exactly where to check if these states are in the current ArcPro session. Is there an event to subscribe to in which I can check for these states continuously?
The use of 'Project.Current.IsEditingEnabled' could be used too, but where can I continuously check to see if the value of this has changed?
OnDrawComplete seems to be a possibility as staff generally zoom in/out and pan as they edit, but there is no guarantee the map will redraw before attempting an edit of some sort whether tabular or shape.