WP7 - Detect 'Click' event on a MapPolygon
I am developing an app for windows phone 7.
I have an overlay on the standard Map object that contains several MapPolygon obje开发者_Go百科cts.
What is the best and/or simplest solution for knowing if the user has tapped one of the polygons?
Using the Silverlight Toolkit is probably the easiest way to do it. Once added to your project use the gesture listener like so:
var gestureListener = GestureService.GetGestureListener(poly);
gestureListener.Tap += new EventHandler<GestureEventArgs>(gestureListener_Tap);
Where gestureListener_Tap is the method called.
精彩评论