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 ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.