Edit

Share via


RecognitionConfidence Enum

Definition

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

C#
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.

C#
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;
        }
    }
}

Remarks

XAML Text Usage

This class is not typically used in XAML.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10