다음을 통해 공유


ContextNodeCreatedEventHandler 대리자

업데이트: 2007년 11월

InkAnalyzerContextNodeCreated 이벤트를 처리할 메서드를 나타냅니다.

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

구문

‘선언
Public Delegate Sub ContextNodeCreatedEventHandler ( _
    sender As Object, _
    e As ContextNodeCreatedEventArgs _
)
‘사용 방법
Dim instance As New ContextNodeCreatedEventHandler(AddressOf HandlerMethod)
public delegate void ContextNodeCreatedEventHandler(
    Object sender,
    ContextNodeCreatedEventArgs e
)
public delegate void ContextNodeCreatedEventHandler(
    Object^ sender, 
    ContextNodeCreatedEventArgs^ e
)
/** @delegate */
public delegate void ContextNodeCreatedEventHandler(
    Object sender,
    ContextNodeCreatedEventArgs e
)
JScript에서는 대리자를 지원하지 않습니다.

매개 변수

설명

ContextNodeCreatedEventHandler 대리자를 만드는 경우 이벤트를 처리하는 메서드를 식별합니다. 이벤트를 이벤트 처리기와 연결하려면 대리자의 인스턴스를 해당 이벤트에 추가합니다. 대리자를 제거하지 않는 경우 이벤트가 발생할 때마다 이벤트 처리기가 호출됩니다. 이벤트 처리기 대리자에 대한 자세한 내용은 Events and Delegates를 참조하십시오.

예제

다음 예제에서는 ContextNodeCreated 이벤트를 처리하는 AddContextNode라는 메서드를 정의합니다. 이벤트 정보는 문서 모델 개체인 theDocumentModel에 전달됩니다.

이 예제에서는 문서 모델의 정의를 제공하거나 문서 모델에서 전달된 정보를 처리하는 방법을 보여 주지 않습니다.

'/ <summary>
'/ Handles the InkAnalyzer.ContextNodeCreated event.
'/ </summary>
'/ <param name="sender">The source of the event.</param>
'/ <param name="e">The event data.</param>
'/ <remarks>
'/ Note: when this event is fired, the ContextNode has not been populated
'/ with extended and other properties. Handle the ContextNodePropertiesUpdated
'/ event to populate the corresponding ContextNode in the document model.
'/ </remarks>
Private Sub AddContextNode( _
    ByVal sender As Object, _
    ByVal e As Microsoft.Ink.ContextNodeCreatedEventArgs)

    ' Do not add unclassified ink nodes to the document model.
    If Microsoft.Ink.ContextNodeType.UnclassifiedInk _
        <> e.NodeCreated.Type Then

        Me.theDocumentModel.AddNode(e.NodeCreated)
    End If

End Sub 'AddContextNode

        /// <summary>
        /// Handles the InkAnalyzer.ContextNodeCreated event.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The event data.</param>
        /// <remarks>
        /// Note: when this event is fired, the ContextNode has not been populated
        /// with extended and other properties. Handle the ContextNodePropertiesUpdated
        /// event to populate the corresponding ContextNode in the document model.
        /// </remarks>
        private void AddContextNode(
            object sender, Microsoft.Ink.ContextNodeCreatedEventArgs e)
        {
            // Do not add unclassified ink nodes to the document model.
            if (Microsoft.Ink.ContextNodeType.UnclassifiedInk
                != e.NodeCreated.Type)
            {
                this.theDocumentModel.AddNode(e.NodeCreated);
            }
        }

플랫폼

Windows Vista

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

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

Microsoft.Ink 네임스페이스