Condividi tramite


Metodo InkCollector.GetGestureStatus

Aggiornamento: novembre 2007

Restituisce un valore che indica se l'oggetto InkCollector ha espresso un interesse in un particolare movimento dell'applicazione.

Spazio dei nomi:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Sintassi

'Dichiarazione
Public Function GetGestureStatus ( _
    gesture As ApplicationGesture _
) As Boolean
'Utilizzo
Dim instance As InkCollector
Dim gesture As ApplicationGesture
Dim returnValue As Boolean

returnValue = instance.GetGestureStatus(gesture)
public bool GetGestureStatus(
    ApplicationGesture gesture
)
public:
bool GetGestureStatus(
    ApplicationGesture gesture
)
public boolean GetGestureStatus(
    ApplicationGesture gesture
)
public function GetGestureStatus(
    gesture : ApplicationGesture
) : boolean

Parametri

Valore restituito

Tipo: System.Boolean
true se l'oggetto InkCollector ha espresso un interesse in un particolare movimento dell'applicazione; in caso contrario, false.

Note

L'evento Gesture viene generato quando il movimento viene riconosciuto.

Questo metodo genera un'eccezione se il parametro gesture è impostato su ApplicationGesture.

Per impostare un interesse dell'oggetto InkCollector per un particolare movimento, chiamare il metodo InkCollector.SetGestureStatus.

Nota

Per impostazione predefinita, l'oggetto InkCollector non ha espresso alcun interesse in nessun movimento dell'applicazione.

Esempi

In questo esempio di C# viene creato un oggetto ArrayList contenente tutti i movimenti dell'applicazione per i quali un oggetto InkCollector, theInkCollector ha espresso un interesse.

using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkCollector object.
private ApplicationGesture [] GetSetAppGestures(InkCollector theInkCollector)
{
    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 && 
            theInkCollector.GetGestureStatus(theGesture))
        {
            result.Add(theGesture);
        }
    }
    return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}

In questo esempio di Microsoft Visual Basic .NET viene creato un oggetto ArrayList contenente tutti i movimenti dell'applicazione per i quali un oggetto InkCollector, theInkCollector ha espresso un interesse.

Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkCollector object.
Private Function GetSetAppGestures(ByVal theInkCollector As InkCollector) 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 _
            theInkCollector.GetGestureStatus(theGesture) Then
            result.Add(theGesture)
        End If
    Next
    Return CType(result.ToArray(test.GetType()), ApplicationGesture())
End Function

Piattaforme

Windows Vista

.NET Framework e .NET Compact Framework non supportano tutte le versioni di ciascuna piattaforma. Per un elenco delle versioni supportate, vedere Requisiti di sistema di .NET Framework.

Informazioni sulla versione

.NET Framework

Supportato in: 3.0

Vedere anche

Riferimenti

InkCollector Classe

Membri InkCollector

Spazio dei nomi Microsoft.Ink

ApplicationGesture

InkCollector.Gesture

InkCollector.SetGestureStatus