Share via


InkEdit.SetGestureStatus Method

Sets whether or not the InkEdit control has interest in a known application gesture.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Sub SetGestureStatus ( _
    gesture As ApplicationGesture, _
    listening As Boolean _
)
'Usage
Dim instance As InkEdit 
Dim gesture As ApplicationGesture 
Dim listening As Boolean

instance.SetGestureStatus(gesture, listening)
public void SetGestureStatus(
    ApplicationGesture gesture,
    bool listening
)
public:
void SetGestureStatus(
    ApplicationGesture gesture, 
    bool listening
)
public function SetGestureStatus(
    gesture : ApplicationGesture, 
    listening : boolean
)

Parameters

  • listening
    Type: System.Boolean

    Whether or not the InkEdit control has interest in a known application gesture.

    true if InkEdit control has interest in the application gesture; otherwise, false.

Remarks

The AllGestures value is not supported by the InkEdit control and returns an error; however, passing invalid gesture identifiers does not return an error.

This method should only be called if the InkEdit.Status property returns the InkEditStatus enumeration value, Idle.

Examples

This C# example sets the interest status of each ApplicationGesture to false on the passed-in InkEdit control, theInkEdit.

using Microsoft.Ink;
// . . .
// Set all of the ApplicationGestures' status
// to false on the InkEdit control.
private void ClearAppGestures(InkEdit theInkEdit)
{
    ApplicationGesture test = ApplicationGesture.NoGesture;
    Array theGestures = System.Enum.GetValues(test.GetType());
    foreach (ApplicationGesture theGesture in theGestures)
    {
        theInkEdit.SetGestureStatus(theGesture, false);
    }
}

This Microsoft® Visual Basic® .NET example sets the interest status of each ApplicationGesture to false on the passed-in InkEdit control, theInkEdit.

Imports Microsoft.Ink
' . . .
' Set all of the ApplicationGestures' status
' to false on the InkEdit object.
Private Sub ClearAppGestures(ByVal theInkEdit As InkEdit)
    Dim test As ApplicationGesture = ApplicationGesture.NoGesture
    Dim theGestures As Array = System.Enum.GetValues(test.GetType())
    Dim theGesture As ApplicationGesture
    For Each theGesture In theGestures
        theInkEdit.SetGestureStatus(theGesture, False)
    Next
End Sub

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

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.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkEdit Class

InkEdit Members

Microsoft.Ink Namespace

InkEdit.GetGestureStatus