/// <summary> /// Wiring active event after draw and selection change events /// </summary> /// <param name="map"></param> private void SetupActiveViewEvents(ESRI.ArcGIS.Carto.IMap map) { if (map == null) { return; } ESRI.ArcGIS.Carto.IActiveViewEvents_Event activeViewEvents = map as ESRI.ArcGIS.Carto.IActiveViewEvents_Event; // Create an instance of the delegate, add it to AfterDraw event m_ActiveViewEventsAfterDraw = new ESRI.ArcGIS.Carto.IActiveViewEvents_AfterDrawEventHandler(OnActiveViewEventsAfterDraw); activeViewEvents.AfterDraw += m_ActiveViewEventsAfterDraw; activeViewEvents.SelectionChanged += new IActiveViewEvents_SelectionChangedEventHandler(activeViewEvents_SelectionChanged); }