You can use GestureListenerEx Wp7Tools .
Add Wp7Tools to your project:
PM> install-package wp7tools
In your xaml:
<Rectangle Fill="Red" Width="100" Height="100"> <toolkit:GestureService.GestureListener> <wp7:GestureListenerEx OnTapAction="Tap" OnDragStartedAction="DragStart" OnDragCompletedAction="DragEnd" /> </toolkit:GestureService.GestureListener> </Rectangle>
And in your ViewModel:
public void Tap(GestureEventArgs e) {
What is it. No code, no commands, just specify the method you want to execute :)
source share