Export (0) Print
Expand All
Expand Minimize

InkPicture.GetGestureStatus Method

InkPicture.GetGestureStatus Method

Returns a value that indicates whether the InkPicture control has interest in a particular application gesture.

Definition

Visual Basic .NET Public Function GetGestureStatus( _
ByVal gesture As ApplicationGesture _
) As Boolean
C# public bool GetGestureStatus(
ApplicationGesture gesture
);
Managed C++ public: bool* GetGestureStatus(
ApplicationGesture *gesture
);

Parameters

gesture Microsoft.Ink.ApplicationGesture. A member of the ApplicationGesture enumeration that represents the gesture to query about.

AllGestures
0
Recognizes all application-specific gestures.
NoGesture
61440
Recognizes no application-specific gestures.
Scratchout
61441
Erases content. This gesture requires at least three strokes in a back-and-forth direction.
Triangle
61442
Inserts input. The triangle must be drawn in a single stroke, without lifting the pen.
Square
61443
Marks an action item. 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
61444
Marks an action item. The star must have exactly five points and be drawn in a single stroke without lifting the pen.
Check
61445
Denotes a check-off. The upward stroke must be twice as long as the smaller downward stroke.
Curlicue
61456
Cuts a word. Start the curlicue on the word you intend to cut.
DoubleCurlicue
61457
Copies a word. Start the double-curlicue on the word you intend to copy.
Circle
61472
Has no suggested semantic behavior or action. The circle must be drawn in a single stroke without lifting the pen.
DoubleCircle
61473
Pastes a selection. The two circles must overlap each other and be drawn in a single stroke without lifting the pen.
SemiCircleLeft
61480
Undoes an action. The semicircle must be drawn from left to right. The two ends of the semicircle should be as horizontally even as possible .
SemiCircleRight
61481
Redoes an action. The semicircle must be drawn from right to left. The two ends of the semicircle should be as horizontally even as possible.
ChevronUp
61488
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.
ChevronDown
61489
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
61490
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
61491
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.
ArrowUp
61496
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.
ArrowDown
61497
Has no suggested semantic behavior or action. The arrow can be drawn in a 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
61498
Has no suggested semantic behavior or action. The arrow can be drawn in a 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
61499
Has no suggested semantic behavior or action. The arrow can be drawn in a 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.
Up
61528
Has no suggested semantic behavior or action. This gesture must be drawn as a single fast flick in the upward direction.
Down
61529
Has no suggested semantic behavior or action. This gesture must be drawn as a single fast flick in the downward direction.
Left
61530
Specifies a backspace. This gesture must be drawn as a single fast flick to the left.
Right
61531
Signifies a space. This gesture must be drawn as a single fast flick to the right.
UpDown
61536
Undoes an 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.
DownUp
61537
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.
LeftRight
61538
Cuts a selection. This gesture must be drawn in a single stroke starting with the left stroke. The two strokes must be as close to each other as possible.
RightLeft
61539
Copies a selection. 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.
UpLeftLong
61540
Decreases the indent. 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.
UpRightLong
61541
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.
DownLeftLong
61542
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.
DownRightLong
61543
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.
UpLeft
61544
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.
UpRight
61545
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.
DownLeft
61546
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.
DownRight
61547
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.
LeftUp
61548
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.
LeftDown
61549
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.
RightUp
61550
Signifies an Input Method Editor (IME) convert. 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.
RightDown
61551
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.
Exclamation
61604
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.
Tap
61680
Signifies a mouse click. For the least amount of slippage, the tap must be made quickly.
DoubleTap
61681
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.

Return Value

System.Boolean. Whether the InkPicture control has interest in a particular application gesture.

true The InkPicture control has interest in the gesture. The Gesture event is raised when the gesture is recognized.
false The InkPicture control has no interest in the gesture.

Exceptions

COMException Leave Site:
ObjectDisposedException Leave Site: The InkPicture control is disposed.

Remarks

This method throws an exception if the gesture parameter is set to AllGestures.

To set interest of the InkPicture control for a particular gesture, call the InkPicture.SetGestureStatus method.

Note: By default, the InkPicture control does not have interest in any application gesture.

Examples

[C#]

This C# example creates an ArrayList Leave Site that contains all application gestures for which an InkPicture control, theInkPicture, has interest.


using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkPicture control.
private ApplicationGesture [] GetSetAppGestures(InkPicture theInkPicture)
{
    ArrayList result = new ArrayList();
    Array gestureArray = System.Enum.GetValues(typeof(ApplicationGesture));
    foreach (ApplicationGesture theGesture in gestureArray)
    {
        // ApplicationGesture.AllGestures is not a meaningful
        // gesture to pass to GetGestureStatus()
        if (theGesture != ApplicationGesture.AllGestures &&
        theInkPicture.GetGestureStatus(theGesture))
        {
            result.Add(theGesture);
        }
    }
    return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}

[VB.NET]

This Microsoft® Visual Basic® .NET example creates an ArrayList Leave Site that contains all application gestures for which an InkPicture control, theInkPicture, has interest.


Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkPicture object.
Private Function GetSetAppGestures(ByVal theInkPicture As InkPicture) As ApplicationGesture()
    Dim result As New ArrayList()
    Dim sampleGesture As ApplicationGesture = ApplicationGesture.NoGesture
    Dim theGestures As Array = System.Enum.GetValues(sampleGesture.GetType())
    Dim theGesture As ApplicationGesture
    For Each theGesture In theGestures
        ' ApplicationGesture.AllGestures is not a meaningful
        ' gesture to pass to GetGestureStatus()
        If (Not theGesture.Equals(ApplicationGesture.AllGestures)) AndAlso _
            theInkPicture.GetGestureStatus(theGesture) Then
            result.Add(theGesture)
        End If
    Next
    Return CType(result.ToArray(sampleGesture.GetType()), ApplicationGesture())
End Function

See Also

Show:
© 2015 Microsoft