public override void DidDeselectAnnotationView(MKMapView mapView, MKAnnotationView view) { var customMapView = mapView as CustomMKMapView; if (customMapView != null && customMapView.IsBeingTouched && SelectAnnotationCommand != null && SelectAnnotationCommand.CanExecute(null)) { SelectAnnotationCommand.Execute(null); } }
public override void DidSelectAnnotationView(MKMapView mapView, MKAnnotationView view) { var mapAnnotation = view.Annotation as IMapAnnotation; var customMapView = mapView as CustomMKMapView; if (mapAnnotation != null && customMapView != null && customMapView.IsBeingTouched && SelectAnnotationCommand != null && SelectAnnotationCommand.CanExecute(mapAnnotation.DataContext)) { SelectAnnotationCommand.Execute(mapAnnotation.DataContext); } }