GestureRecognitionResult.ApplicationGesture Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the recognized ink gesture.
public:
property System::Windows::Ink::ApplicationGesture ApplicationGesture { System::Windows::Ink::ApplicationGesture get(); };
public System.Windows.Ink.ApplicationGesture ApplicationGesture { get; }
member this.ApplicationGesture : System.Windows.Ink.ApplicationGesture
Public ReadOnly Property ApplicationGesture As ApplicationGesture
Property Value
The recognized ink gesture.
Examples
The following example demonstrates how to identify a gesture on an InkCanvas. This example assumes that there is an InkCanvas called inkCanvas1
and that its Gesture event has been connected to the event handler in the code.
void inkCanvas1_Gesture(object sender, InkCanvasGestureEventArgs e)
{
ReadOnlyCollection<GestureRecognitionResult> gestureResults =
e.GetGestureRecognitionResults();
// Check the first recognition result for a gesture.
if (gestureResults[0].RecognitionConfidence ==
RecognitionConfidence.Strong)
{
switch (gestureResults[0].ApplicationGesture)
{
case ApplicationGesture.Down:
// Do something.
break;
case ApplicationGesture.ArrowDown:
// Do something.
break;
case ApplicationGesture.Circle:
// Do something.
break;
}
}
}
Sub inkCanvas1_Gesture(ByVal sender As Object, _
ByVal e As InkCanvasGestureEventArgs) Handles inkCanvas1.Gesture
Dim gestureResults As ReadOnlyCollection(Of GestureRecognitionResult)
gestureResults = e.GetGestureRecognitionResults()
' Check the first recognition result for a gesture.
If gestureResults(0).RecognitionConfidence = _
RecognitionConfidence.Strong Then
Select Case gestureResults(0).ApplicationGesture
Case ApplicationGesture.Down
' Do something.
Case ApplicationGesture.ArrowDown
' Do something.
Case ApplicationGesture.Circle
' Do something.
End Select
End If
End Sub
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.