RecognitionConfidence 枚举

定义

指定 GestureRecognizer 确定特定墨迹笔势的置信度。

public enum class RecognitionConfidence
public enum RecognitionConfidence
type RecognitionConfidence = 
Public Enum RecognitionConfidence
继承
RecognitionConfidence

字段

Intermediate 1

指示识别结果的置信度中等。

Poor 2

指示识别结果的置信度很低。

Strong 0

指示识别结果的置信度很高。

示例

以下示例演示如何标识 上的 InkCanvas手势。 此示例假定有一inkCanvas1个名为 InkCanvas 的 ,并且其 Gesture 事件已连接到此示例中的事件处理程序。

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

注解

XAML 文本用法

此类通常不在 XAML 中使用。

适用于