Compartir a través de


InkPicture.SetGestureStatus Method

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

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

    false if the InkPicture 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 InkPicture 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 InkPicture object, theInkPicture.

[C#]

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

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

[Visual Basic]

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

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