Freigeben über


InkOverlay.SetGestureStatus Method

Sets whether or not the InkOverlay 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 InkOverlay
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 InkOverlay object has interest in a known application gesture.

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

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

Remarks

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

To return a value that indicates whether the InkOverlay 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 InkOverlay object, theInkOverlay.

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

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

Imports Microsoft.Ink
' . . .
' Set all of the ApplicationGestures' status
' to false on the InkOverlay object.
Private Sub ClearAppGestures(ByVal theInkOverlay As InkOverlay)
    Dim test As ApplicationGesture = ApplicationGesture.NoGesture
    Dim theGestures As Array = System.Enum.GetValues(test.GetType())
    Dim theGesture As ApplicationGesture
    For Each theGesture In theGestures
        theInkOverlay.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

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