开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜