다음을 통해 공유


InkEdit.Recognition 이벤트

업데이트: 2007년 11월

InkEdit 컨트롤에서 인식 결과를 가져올 때 발생합니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Public Event Recognition As InkEditRecognitionEventHandler
‘사용 방법
Dim instance As InkEdit
Dim handler As InkEditRecognitionEventHandler

AddHandler instance.Recognition, handler
public event InkEditRecognitionEventHandler Recognition
public:
 event InkEditRecognitionEventHandler^ Recognition {
    void add (InkEditRecognitionEventHandler^ value);
    void remove (InkEditRecognitionEventHandler^ value);
}
/** @event */
public void add_Recognition (InkEditRecognitionEventHandler value)
/** @event */
public void remove_Recognition (InkEditRecognitionEventHandler value)
JScript에서는 이벤트를 지원하지 않습니다.

설명

이벤트 처리기는 이 이벤트에 대한 데이터가 들어 있는 InkEditRecognitionEventArgs 형식의 인수를 받습니다.

InkEditRecognitionEventHandler 대리자를 만들 때는 이벤트를 처리할 메서드를 식별합니다. 이벤트를 이벤트 처리기와 연결하려면 대리자의 인스턴스를 해당 이벤트에 추가합니다. 대리자를 제거하지 않는 경우 이벤트가 발생할 때마다 이벤트 처리기가 호출됩니다.

InkEdit 컨트롤은 다음 두 가지 방식 중 하나로 인식 결과를 가져옵니다.

  • InkEdit.Recognize 메서드를 호출하여 수동으로

  • 인식 시간 제한이 발생한 후 자동으로

예제

이 예제에서는 Recognition 이벤트를 사용하여 RecognitionResult 개체를 유지합니다. 우선 SetResultOnStrokes 메서드를 호출하여 RecognitionResult 개체를 관련 Strokes 컬렉션에 연결합니다. 그런 다음 연결된 Ink 개체의 CustomStrokes 속성에 Strokes가 추가됩니다.

Private Sub mInkEdit_Recognition(ByVal sender As Object, ByVal e As InkEditRecognitionEventArgs)
    Dim R As RecognitionResult = e.RecognitionResult
    R.SetResultOnStrokes()
    ' add these strokes to custom strokes collection
    ' using R.Strokes(0).Id as the name
    R.Strokes.Ink.CustomStrokes.Add(R.Strokes(0).Id.ToString(), R.Strokes)
End Sub
private void mInkEdit_Recognition(object sender, InkEditRecognitionEventArgs e)
{
    RecognitionResult R = e.RecognitionResult;
    R.SetResultOnStrokes();
    // add these strokes to custom strokes collection
    // using R.Strokes[0].Id as the name
    R.Strokes.Ink.CustomStrokes.Add(R.Strokes[0].Id.ToString(), R.Strokes);
}

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

InkEdit 클래스

InkEdit 멤버

Microsoft.Ink 네임스페이스

InkEditRecognitionEventArgs

InkEdit.RecoTimeout

InkEdit.Recognize

RecognitionResult.TopString

RecognitionResult.ModifyTopAlternate