There are a few tools in ArcGIS pro which can perform feature selection like below.
My question is that is there any event I can subscribe/delegate events from my ArcGIS pro addin code to the selection?
Not sure I am in right track, currently I am using this way by subscribing the OnMapSelectionChangedEvent.
Please advice if there is better way to perform.
private async void OnMapSelectionChangedEventAsync(MapSelectionChangedEventArgs obj)
MessageBox.Show("Selection has changed");
if(MapView.Active != null && MapView.Active.Map != null)
Dictionary<MapMember, List<long>> selection = await QueuedTask.Run(() =>
if(selection.Count > 0)
//Lets process there is some selection
System.Diagnostics.Debug.Write("There are some selection");
System.Diagnostics.Debug.Write("There is no any selection to perform the feature selection process");