共用方式為


InkAnalyzer.ContextNodePropertiesUpdated 事件

InkAnalyzer 更新一個或多個 ContextNode 的屬性之後發生。

命名空間:  Microsoft.Ink
組件:  Microsoft.Ink.Analysis (在 Microsoft.Ink.Analysis.dll 中)

語法

'宣告
Public Event ContextNodePropertiesUpdated As ContextNodePropertiesUpdatedEventHandler
'用途
Dim instance As InkAnalyzer
Dim handler As ContextNodePropertiesUpdatedEventHandler

AddHandler instance.ContextNodePropertiesUpdated, handler
public event ContextNodePropertiesUpdatedEventHandler ContextNodePropertiesUpdated
public:
 event ContextNodePropertiesUpdatedEventHandler^ ContextNodePropertiesUpdated {
    void add (ContextNodePropertiesUpdatedEventHandler^ value);
    void remove (ContextNodePropertiesUpdatedEventHandler^ value);
}
/** @event */
public void add_ContextNodePropertiesUpdated (ContextNodePropertiesUpdatedEventHandler value)
/** @event */
public void remove_ContextNodePropertiesUpdated (ContextNodePropertiesUpdatedEventHandler value)
JScript 不支援事件。

備註

當您的應用程式維護本身的資料結構時使用這個事件,該資料結構會與 InkAnalyzer 的資料結構同步處理。這個事件會在筆墨分析的協調階段,或是回應變更 ContextNode 的屬性之 InkAnalyzer 方法時發生。

如需將應用程式資料與 InkAnalyzer 進行同步處理的詳細資訊,請參閱Data Proxy with Ink Analysis

範例

這個範例會定義 AttachDataProxyEventHandlers 方法,將資料 Proxy 事件處理常式附加至 InkAnalyzer,也就是 theInkAnalyzer。

Private Sub AttachDataProxyEventHandlers() 
    ' If the document model supports on demand data proxy, then add an
    ' event handler for the PopulateContextNode event. This event is raised
    ' when the InkAnalyzer accesses a partially populated ContextNode created
    ' by the document model.
    If Me.theDocumentModel.SupportsOnDemandDataProxy Then
        AddHandler Me.theInkAnalyzer.PopulateContextNode, AddressOf Me.PopulateContextNode
    End If

    ' Add the other data proxy related event handlers. These events are raised
    ' by the InkAnalyzer to communicate ink analysis results to the document model.
    AddHandler Me.theInkAnalyzer.ContextNodeCreated, AddressOf Me.AddContextNode
    AddHandler Me.theInkAnalyzer.ContextNodeDeleting, AddressOf Me.RemoveContextNode
    AddHandler Me.theInkAnalyzer.ContextNodeLinkAdding, AddressOf Me.AddContextNodeLink
    AddHandler Me.theInkAnalyzer.ContextNodeLinkDeleting, AddressOf Me.RemoveContextNodeLink
    AddHandler Me.theInkAnalyzer.ContextNodeMovingToPosition, AddressOf Me.MoveContextNodeToPosition
    AddHandler Me.theInkAnalyzer.ContextNodePropertiesUpdated, AddressOf Me.UpdateContextNodeProperties
    AddHandler Me.theInkAnalyzer.ContextNodeReparenting, AddressOf Me.ReparentContextNode
    AddHandler Me.theInkAnalyzer.InkAnalyzerStateChanging, AddressOf Me.InkAnalyzer_StateChanging
    AddHandler Me.theInkAnalyzer.StrokesReparented, AddressOf Me.ReparentStroke
    AddHandler Me.theInkAnalyzer.IntermediateResultsUpdated, AddressOf Me.ResultsAvailable
    AddHandler Me.theInkAnalyzer.ResultsUpdated, AddressOf Me.ResultsAvailable

End Sub 'AttachDataProxyEventHandlers
        private void AttachDataProxyEventHandlers()
        {
            // If the document model supports on demand data proxy, then add an
            // event handler for the PopulateContextNode event. This event is raised
            // when the InkAnalyzer accesses a partially populated ContextNode created
            // by the document model.
            if (this.theDocumentModel.SupportsOnDemandDataProxy)
            {
                this.theInkAnalyzer.PopulateContextNode +=
                    new Microsoft.Ink.PopulateContextNodeEventHandler(
                        this.PopulateContextNode);
            }

            // Add the other data proxy related event handlers. These events are raised
            // by the InkAnalyzer to communicate ink analysis results to the document model.
            this.theInkAnalyzer.ContextNodeCreated +=
                new Microsoft.Ink.ContextNodeCreatedEventHandler(
                    this.AddContextNode);
            this.theInkAnalyzer.ContextNodeDeleting +=
                new Microsoft.Ink.ContextNodeDeletingEventHandler(
                    this.RemoveContextNode);
            this.theInkAnalyzer.ContextNodeLinkAdding +=
                new Microsoft.Ink.ContextNodeLinkAddingEventHandler(
                    this.AddContextNodeLink);
            this.theInkAnalyzer.ContextNodeLinkDeleting +=
                new Microsoft.Ink.ContextNodeLinkDeletingEventHandler(
                    this.RemoveContextNodeLink);
            this.theInkAnalyzer.ContextNodeMovingToPosition +=
                new Microsoft.Ink.ContextNodeMovingToPositionEventHandler(
                    this.MoveContextNodeToPosition);
            this.theInkAnalyzer.ContextNodePropertiesUpdated +=
                new Microsoft.Ink.ContextNodePropertiesUpdatedEventHandler(
                    this.UpdateContextNodeProperties);
            this.theInkAnalyzer.ContextNodeReparenting +=
                new Microsoft.Ink.ContextNodeReparentingEventHandler(
                    this.ReparentContextNode);
            this.theInkAnalyzer.InkAnalyzerStateChanging +=
                new Microsoft.Ink.InkAnalyzerStateChangingEventHandler(
                    this.InkAnalyzer_StateChanging);
            this.theInkAnalyzer.StrokesReparented +=
                new Microsoft.Ink.StrokesReparentedEventHandler(
                    this.ReparentStrokes);
            this.theInkAnalyzer.IntermediateResultsUpdated +=
                new Microsoft.Ink.ResultsUpdatedEventHandler(
                    this.ResultsAvailable);
            this.theInkAnalyzer.ResultsUpdated +=
                new Microsoft.Ink.ResultsUpdatedEventHandler(
                    this.ResultsAvailable);
        }

下列範例會定義用來處理 ContextNodePropertiesUpdated 事件的 UpdateContextNodeProperties 方法。事件資訊會傳遞至 theDocumentModel 文件模型物件。

這個範例並未提供文件模型的定義,也未示範處理傳入資訊的方式。

'/ <summary>
'/ Handles the InkAnalyzer.ContextNodePropertiesUpdated event.
'/ </summary>
'/ <param name="sender">The source of the event.</param>
'/ <param name="e">The event data.</param>
Private Sub UpdateContextNodeProperties( _
    ByVal sender As Object, _
    ByVal e As Microsoft.Ink.ContextNodePropertiesUpdatedEventArgs)

    Me.theDocumentModel.UpdateNodeProperties(e.UpdatedNode)

End Sub 'UpdateContextNodeProperties

        /// <summary>
        /// Handles the InkAnalyzer.ContextNodePropertiesUpdated event.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The event data.</param>
        private void UpdateContextNodeProperties(
            object sender, Microsoft.Ink.ContextNodePropertiesUpdatedEventArgs e)
        {
            this.theDocumentModel.UpdateNodeProperties(e.UpdatedNode);
        }

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Framework

支援版本:3.0

請參閱

參考

InkAnalyzer 類別

InkAnalyzer 成員

Microsoft.Ink 命名空間

InkAnalyzer.ContextNodeCreated

Microsoft.Ink.ContextNodePropertiesUpdatedEventArgs