10

Has anyone implemented Tap & Hold in a Windows Phone 7 App yet? I can see a couple of possible approaches KeyDown/KeyUp and a timer or ManipulationStarted/manipulationCompleted and a timer.
However it strikes me that this is a less than idea approach because different apps would have different timer settings leading to inconsistency.
Am I missing something? I was hoping for a TapAndHold event

Ganapathy C
  • 5,989
  • 5
  • 42
  • 75
David Hayes
  • 7,402
  • 14
  • 50
  • 62

5 Answers5

6

For all views Hold method is there. It will handle long press function.

Ganapathy C
  • 5,989
  • 5
  • 42
  • 75
3

I'm in the same situation, and I'm looking for "the recommended way". In the meantime, Mike Francis posted a solution on his blog, using Microsoft.Xna.Framework.Input.TouchPanel's gesture recognition within a Silverlight app. I didn't try it.

Ryan Kyle
  • 743
  • 8
  • 21
Martin Plante
  • 4,553
  • 3
  • 33
  • 45
  • Thanks for the link, that was pretty much the solution I was contemplating. I wonder if this is something missing from the beta? – David Hayes Jul 30 '10 at 13:07
3

Silverlight Toolkit for Windows Phone adds easy to use gestures support, including On Hold gestures

jyavenard
  • 2,142
  • 1
  • 26
  • 35
0
Button b = new Button();
b.Hold += new EventHandler<System.Windows.Input.GestureEventArgs>(HoldEventHandler);

The above code should work for touch and hold event

0

Start the Timer on Hold Event of GestureLister

and stop it on GestureCompleted event this is really a trick see detail answer on following link

How do I detect when toolkit:GestureListener Hold has stopped?

Community
  • 1
  • 1
Mubashar
  • 12,300
  • 11
  • 66
  • 95