Redigera

Dela via


RecognitionConfidence Enum

Definition

Specifies the confidence level that the GestureRecognizer determines for a particular ink gesture.

public enum class RecognitionConfidence
public enum RecognitionConfidence
type RecognitionConfidence = 
Public Enum RecognitionConfidence
Inheritance
RecognitionConfidence

Fields

Name Value Description
Strong 0

Indicates strong confidence in the recognition result.

Intermediate 1

Indicates intermediate confidence in the recognition result.

Poor 2

Indicates poor confidence in the recognition result.

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 this example.

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

Remarks

XAML Text Usage

This class is not typically used in XAML.

Applies to