I’ve recently added some touch support to our map for rotation as well as using the default pan, zoom and click behaviors but I can’t seem to get a right click to work so that a context menu would be shown. Any ideas on how to accomplish this. using the mouse or any other hardware pointing device (such as a Surface Pro’s stylus) work correctly but any other gestures that seem like they should result in a right click (touch and hold, touch and tap, two finger tap) don’t.
Right click using touch
Hi Aaron,
If I misunderstand you please let me know.
In WPF’s Map, we have MapClick, MapTap and MapDoubleClick event, and we supports all the WPF control event, likes MouseDown/Up, MoustLeftButtonDown/Up, MouseRightButtonDown/Up etc. below is sample code to handle right click.
wpfMap1.MouseRightButtonDown += WpfMap1_MouseRightButtonDown;
wpfMap1.MouseRightButtonUp += WpfMap1_MouseRightButtonUp;
More gestures can be created with basic gesture.
1. Touch and hold(Long Press)
Creates one long press event for map, start one timer when MapClicked, if timer elepased the mouse still in down status, raise Long press event.
2. Touch and tap
Uses MapClick or MapTap event.
3. Two finger tap
Uses one counter to record the finger count, increase number when raised MouseDown, raise the two finger tap gesture when count is 2.
Thanks