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 (discussed in the next section) are raised only if the UIElement is detected beneath the touch point. Make sure that the Background property of the UIElement is not null. If a background is not defined, touch events pass through the host control, and gestures are not detected. To achieve a see-through background, while still maintaining gesture support, set the background property of the UIElement to Transparent.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.254.179