/// <summary> /// Called by Framework when ArcGIS Pro is closing /// </summary> /// <returns>False to prevent Pro from closing, otherwise True</returns> protected override bool CanUnload() { MapViewInitializedEvent.Unsubscribe(OnMapViewInitialized); MapMemberPropertiesChangedEvent.Unsubscribe(OnMapMemberPropertiesChanged); MapClosedEvent.Unsubscribe(OnMapClosed); //return false to ~cancel~ Application close return(true); }
protected override async void Uninitialize() { await RemoveLayersAsync(true); MapViewInitializedEvent.Unsubscribe(OnMapViewInitialized); MapClosedEvent.Unsubscribe(OnMapClosedDocument); base.Uninitialize(); }