This topic has not yet been rated - Rate this topic

ApplicationGesture Enumeration

Specifies the available application-specific gesture.

Namespace:  System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
public enum ApplicationGesture
This class is not typically used in XAML.
Member name Description
AllGestures Recognizes all application-specific gestures.
ArrowDown Has no suggested semantic behavior or action. The arrow can be drawn in single stroke or in two strokes where one stroke is the line and the other is the arrow head. Do not use more than two strokes to draw the arrow.
ArrowLeft Has no suggested semantic behavior or action. The arrow can be drawn in single stroke or in two strokes where one stroke is the line and the other is the arrow head. Do not use more than two strokes to draw the arrow.
ArrowRight Has no suggested semantic behavior or action. The arrow can be drawn in single stroke or in two strokes where one stroke is the line and the other is the arrow head. Do not use more than two strokes to draw the arrow.
ArrowUp Has no suggested semantic behavior or action. The arrow can be drawn in single stroke or in two strokes where one stroke is the line and the other is the arrow head. Do not use more than two strokes to draw the arrow.
Check Has no suggested semantic behavior or action. The upward stroke must be twice as long as the smaller downward stroke.
ChevronDown Has no suggested semantic behavior or action. Both sides of the chevron must be drawn as equal as possible. The angle must be sharp and end in a point.
ChevronLeft Has no suggested semantic behavior or action. Both sides of the chevron must be drawn as equal as possible. The angle must be sharp and end in a point.
ChevronRight Has no suggested semantic behavior or action. Both sides of the chevron must be drawn as equal as possible. The angle must be sharp and end in a point.
ChevronUp Has no suggested semantic behavior or action. Both sides of the chevron must be drawn as equal as possible. The angle must be sharp and end in a point.
Circle Has no suggested semantic behavior or action. The circle must be drawn in a single stroke without lifting the pen.
Curlicue Has no suggested semantic behavior or action. Start the curlicue on the word you intend to cut.
DoubleCircle Has no suggested semantic behavior or action. The two circles must overlap each other and be drawn in a single stroke without lifting the pen.
DoubleCurlicue Has no suggested semantic behavior or action. Start the double-curlicue on the word you intend to copy.
DoubleTap Signifies a mouse double-click. The two taps must be made quickly to result in the least amount of slippage and the least duration between taps. In addition, the taps must be as close to each other as possible.
Down Has no suggested semantic behavior or action. This gesture must be drawn as a single fast flick in the downward direction.
DownLeft Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the down stroke. The two sides must be as equal in length as possible and at a right angle.
DownLeftLong Signifies pressing an ENTER key. This gesture must be drawn in a single stroke starting with the down stroke. The left stroke is about twice as long as the up stroke, and the two strokes must be at a right angle.
DownRight Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the down stroke. The two sides must be as equal in length as possible and at a right angle.
DownRightLong Signifies pressing the spacebar. This gesture must be drawn in a single stroke starting with the down stroke. The right stroke must be about twice as long as the up stroke, and the two strokes must be at a right angle.
DownUp Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the down stroke. The two strokes must be as close to each other as possible.
Exclamation Has no suggested semantic behavior or action. The line must be drawn first and then the dot drawn quickly and as close to the line as possible.
Left Specifies a backspace. This gesture must be drawn as a single fast flick to the left.
LeftDown Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the left stroke. The two sides are as equal in length as possible and at a right angle.
LeftRight Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the left stroke. The two sides are as equal in length as possible and at a right angle.
LeftUp Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the left stroke. The two sides must be as equal in length as possible and at a right angle.
NoGesture Recognizes no application-specific gestures.
Right Signifies a space. This gesture must be drawn as a single fast flick to the right.
RightDown Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the right stroke. The two sides must be as equal in length as possible and at a right angle.
RightLeft Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the right stroke. The two strokes must be as close to each other as possible.
RightUp Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the right stroke. The two sides must be as equal in length as possible and at a right angle.
ScratchOut Erases content. This gesture must be drawn as a single stroke that has at least three back-and-forth motions.
SemicircleLeft Has no suggested semantic behavior or action. The semicircle must be drawn from left to right. The two ends of the semicircle should be as horizontally even as possible.
SemicircleRight Has no suggested semantic behavior or action. The semicircle must be drawn from right to left. The two ends of the semicircle should be as horizontally even as possible.
Square Has no suggested semantic behavior or action. The square can be drawn in one or two strokes. In one stroke, draw the entire square without lifting the pen. In two strokes, draw three sides of the square and use another stroke to draw the remaining side. Do not use more than two strokes to draw the square.
Star Has no suggested semantic behavior or action. The star must have exactly five points and be drawn in a single stroke without lifting the pen.
Tap Signifies a mouse click. For the least amount of slippage, the tap must be made quickly.
Triangle Has no suggested semantic behavior or action. The triangle must be drawn in a single stroke, without lifting the pen.
Up Has no suggested semantic behavior or action. This gesture must be drawn as a single fast flick in the upward direction.
UpDown Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the up stroke. The two strokes must be as close to each other as possible.
UpLeft Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the up stroke. The two sides must be as equal in length as possible and at a right angle.
UpLeftLong Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the up stroke. The left stroke must be about twice as long as the up stroke, and the two strokes must be at a right angle.
UpRight Has no suggested semantic behavior or action. This gesture must be drawn in a single stroke starting with the up stroke. The two sides must be as equal in length as possible and at a right angle.
UpRightLong Signifies pressing a TAB key. This gesture must be drawn in a single stroke starting with the up stroke. The right stroke must be about twice as long as the up stroke, and the two strokes must be at a right angle.

The following example demonstrates how to identify a gesture on an InkCanvas. This example assumes that there is an InkCanvas called inkCanvas1 and that its Gesture event has been connected to the event handler in this example.

void inkCanvas1_Gesture(object sender, InkCanvasGestureEventArgs e)
{
    ReadOnlyCollection<GestureRecognitionResult> gestureResults = 
        e.GetGestureRecognitionResults();

    // Check the first recognition result for a gesture.
    if (gestureResults[0].RecognitionConfidence == 
        RecognitionConfidence.Strong)
    {
        switch (gestureResults[0].ApplicationGesture)
        {
            case ApplicationGesture.Down:
                // Do something.
                break;
            case ApplicationGesture.ArrowDown:
                // Do something.
                break;
            case ApplicationGesture.Circle:
                // Do something.
                break;
        }

    }
}


Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ