Compartir a través de


InkCollector.SetGestureStatus Method

Sets whether or not the InkCollector object 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 InkCollector
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 void SetGestureStatus (
    ApplicationGesture gesture, 
    boolean listening
)
public function SetGestureStatus (
    gesture : ApplicationGesture, 
    listening : boolean
)
Not applicable.

Parameters

  • gesture
    A member of the ApplicationGesture enumeration, which indicates the gesture to set the status of.
  • listening
    Whether or not the InkCollector object has interest in a known application gesture.

    true if the InkCollector object has interest in the application gesture.

    false if the InkCollector object does not have interest in the application gesture.

Remarks

To enable or disable all application gestures in one call, use the ApplicationGesture value of the ApplicationGesture enumeration.

To return a value that indicates whether the InkCollector object has interest in a particular application gesture, call the GetGestureStatus method.

Example

This C# example sets the interest status of each ApplicationGesture to false on the passed-in InkCollector object, theInkCollector.

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

This Microsoft Visual Basic .NET example sets the interest status of each ApplicationGesture to false on the passed-in InkCollector object, theInkCollector.

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

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkCollector Class
InkCollector Members
Microsoft.Ink Namespace
InkCollector.Gesture
InkCollector.GetGestureStatus
ApplicationGesture