InkEdit.GetGestureStatus-Methode
Gibt einen Wert zurück, der angibt, ob das InkEdit-Objekt Interesse an einer bestimmten Anwendungsstiftbewegung hat.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Function GetGestureStatus ( _
gesture As ApplicationGesture _
) As Boolean
'Usage
Dim instance As InkEdit
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
Parameter
- gesture
Typ: Microsoft.Ink.ApplicationGesture
Ein Member der ApplicationGesture-Enumeration, der die abzufragende Stiftbewegung darstellt.
Rückgabewert
Typ: System.Boolean
Gibt an, ob das InkEdit-Steuerelement Interesse an einer bestimmten Anwendungsstiftbewegung hat.
Wert |
Bedeutung |
---|---|
true |
Das InkEdit-Steuerelement hat Interesse an der Stiftbewegung. Das Gesture-Ereignis wird ausgelöst, wenn die Stiftbewegung erkannt wird. |
false |
Das InkEdit-Steuerelement hat kein Interesse an der Stiftbewegung. |
Hinweise
Diese Methode löst eine Ausnahme aus, wenn der gesture-Parameter auf ApplicationGesture festgelegt ist.
Rufen Sie die SetGestureStatus-Methode auf, um das Interesse des InkEdit-Steuerelements für eine bestimmte Stiftbewegung festzulegen.
Hinweis
Das InkEdit-Steuerelement hat standardmäßig Interesse an folgenden Anwendungsstiftbewegungen:
Beispiele
In diesem C#-Beispiel wird ein ArrayList-Objekt erstellt, das alle Anwendungsstiftbewegungen enthält, an denen das InkEdit-Steuerelement theInkEdit Interesse hat.
using Microsoft.Ink;
// . . .
// Return an array of all of the ApplicationGestures that
// have their status set to true on the InkEdit control.
private ApplicationGesture [] GetSetAppGestures(InkEdit theInkEdit)
{
ArrayList result = new ArrayList();
ApplicationGesture test = ApplicationGesture.NoGesture;
Array gestureArray = System.Enum.GetValues(test.GetType());
foreach (ApplicationGesture theGesture in gestureArray)
{
// ApplicationGesture.AllGestures is not a meaningful
// gesture to pass to GetGestureStatus()
if (theGesture != ApplicationGesture.AllGestures &&
theInkEdit.GetGestureStatus(theGesture))
{
result.Add(theGesture);
}
}
return (ApplicationGesture[])result.ToArray(typeof(ApplicationGesture));
}
In diesem Microsoft® Visual Basic® .NET-Beispiel wird ein ArrayList-Objekt erstellt, das alle Anwendungsstiftbewegungen enthält, an denen das InkEdit-Steuerelement theInkEdit Interesse hat.
Imports Microsoft.Ink
' . . .
' Return an array of all of the ApplicationGestures that
' have their status set to true on the InkEdit control.
Private Function GetSetAppGestures(ByVal theInkEdit As InkEdit) _
As ApplicationGesture()
Dim result As New ArrayList()
Dim test As ApplicationGesture = ApplicationGesture.NoGesture
Dim theGestures As Array = System.Enum.GetValues(test.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
Plattformen
Windows Vista
.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.
Versionsinformationen
.NET Framework
Unterstützt in: 3.0