InkAnalyzer.StrokesReparented 이벤트
업데이트: 2007년 11월
InkAnalyzer에서 ContextNode 간에 Stroke를 이동할 때 발생합니다.
네임스페이스: Microsoft.Ink
어셈블리: Microsoft.Ink.Analysis(Microsoft.Ink.Analysis.dll)
구문
‘선언
Public Event StrokesReparented As StrokesReparentedEventHandler
‘사용 방법
Dim instance As InkAnalyzer
Dim handler As StrokesReparentedEventHandler
AddHandler instance.StrokesReparented, handler
public event StrokesReparentedEventHandler StrokesReparented
public:
event StrokesReparentedEventHandler^ StrokesReparented {
void add (StrokesReparentedEventHandler^ value);
void remove (StrokesReparentedEventHandler^ value);
}
/** @event */
public void add_StrokesReparented (StrokesReparentedEventHandler value)
/** @event */
public void remove_StrokesReparented (StrokesReparentedEventHandler value)
JScript에서는 이벤트를 지원하지 않습니다.
설명
응용 프로그램에서 InkAnalyzer의 데이터 구조와 동기화되는 자체 데이터 구조를 유지하는 경우 이 이벤트를 사용합니다. 이 이벤트는 잉크 분석의 조정 단계에서 발생하거나 ContextNode 간에 Stroke를 이동하는 InkAnalyzer 메서드에 응답하여 발생합니다.
응용 프로그램 데이터와 InkAnalyzer를 동기화하는 방법에 대한 자세한 내용은 Data Proxy with Ink Analysis을를 참조하십시오.
예제
이 예제에서는 InkAnalyzer인 theInkAnalyzer에 데이터 프록시 이벤트 처리기를 연결하는 AttachDataProxyEventHandlers라는 메서드를 정의합니다.
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);
}
다음 예제에서는 StrokesReparented 이벤트를 처리하는 ReparentStrokes라는 메서드를 정의합니다. 이벤트 정보는 문서 모델 개체인 theDocumentModel에 전달됩니다.
이 예제에서는 문서 모델의 정의를 제공하거나 문서 모델에서 전달된 정보를 처리하는 방법을 보여 주지 않습니다.
'/ <summary>
'/ Handles the InkAnalyzer.StrokeReparented event.
'/ </summary>
'/ <param name="sender">The source of the event.</param>
'/ <param name="e">The event data.</param>
Private Sub ReparentStroke( _
ByVal sender As Object, _
ByVal e As Microsoft.Ink.StrokesReparentedEventArgs)
Me.theDocumentModel.ReparentStrokes(e.ReparentedStrokes, e.SourceNode, _
e.DestinationNode, CType(sender, Microsoft.Ink.InkAnalyzer))
End Sub 'ReparentStroke
/// <summary>
/// Handles the InkAnalyzer.StrokeReparented event.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
private void ReparentStrokes(
object sender, Microsoft.Ink.StrokesReparentedEventArgs e)
{
this.theDocumentModel.ReparentStroke(
e.ReparentedStrokes, e.SourceNode, e.DestinationNode,
(Microsoft.Ink.InkAnalyzer)sender);
}
플랫폼
Windows Vista
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원
참고 항목
참조
InkAnalyzer.ContextNodeCreated