O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hold Gesture

The hold gesture is performed by touching the screen while continuing contact for a period of time (see Figure 12.5).

Image

FIGURE 12.5 Hold gesture.

The UIElement.Hold event is raised when the user touches the screen for one second.

An event handler for the Hold event is shown in the following excerpt:

void HandleHold(object sender, GestureEventArgs e){    textBlock.Text = "hold";}

As an aside, the UIElement Hold event is used by the Windows Phone Toolkit’s ContextMenu component. When used in this way, the hold gesture mimics the right-click of a mouse.

Note

UIElement and Windows Phone Toolkit gesture events ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required