다음을 통해 공유


GestureRecognitionResult.RecognitionConfidence 속성

정의

GestureRecognizer가 제스처를 인식했는지에 대한 신뢰 수준을 가져옵니다.

public:
 property System::Windows::Ink::RecognitionConfidence RecognitionConfidence { System::Windows::Ink::RecognitionConfidence get(); };
public System.Windows.Ink.RecognitionConfidence RecognitionConfidence { get; }
member this.RecognitionConfidence : System.Windows.Ink.RecognitionConfidence
Public ReadOnly Property RecognitionConfidence As RecognitionConfidence

속성 값

RecognitionConfidence 수준 중 하나입니다.

예제

다음 예제에서 제스처를 식별 하는 방법에 설명 된 InkCanvas합니다. 이 예제에서는 있다고 가정를 InkCanvas 호출 inkCanvas1 하 고 해당 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

적용 대상