InkAnalyzerBase.StrokesReparentedBase 이벤트
업데이트: 2007년 11월
InkAnalyzerBase가 다른 ContextNodeBase로 스트로크를 이동할 때 발생합니다.
네임스페이스: System.Windows.Ink.AnalysisCore
어셈블리: IACore(IACore.dll)
구문
‘선언
Public Event StrokesReparentedBase As StrokesReparentedBaseEventHandler
‘사용 방법
Dim instance As InkAnalyzerBase
Dim handler As StrokesReparentedBaseEventHandler
AddHandler instance.StrokesReparentedBase, handler
public event StrokesReparentedBaseEventHandler StrokesReparentedBase
public:
event StrokesReparentedBaseEventHandler^ StrokesReparentedBase {
void add (StrokesReparentedBaseEventHandler^ value);
void remove (StrokesReparentedBaseEventHandler^ value);
}
/** @event */
public void add_StrokesReparentedBase (StrokesReparentedBaseEventHandler value)
/** @event */
public void remove_StrokesReparentedBase (StrokesReparentedBaseEventHandler value)
JScript에서는 이벤트를 지원하지 않습니다.
설명
응용 프로그램에서 InkAnalyzerBase의 데이터 구조와 동기화되는 자체 데이터 구조를 유지하는 경우 이 이벤트를 사용합니다. 이 이벤트는 잉크 분석의 조정 단계에서 발생하거나 스트로크를 다른 ContextNodeBase로 이동하는 InkAnalyzerBase 메서드에 대한 응답으로 발생합니다.
응용 프로그램 데이터와 InkAnalyzerBase를 동기화하는 방법에 대한 자세한 내용은 Data Proxy with Ink Analysis을를 참조하십시오.
예제
이 예제에서는 InkAnalyzerBase인 baseInkAnalyzer에 데이터 프록시 이벤트 처리기를 연결하는 AttachDataProxyEventHandlers라는 메서드를 정의합니다.
Private Sub AttachDataProxyEventHandlers()
' If the document model supports on demand data proxy, then add an
' event handler for the PopulateContextNodeBase event. This event is raised
' when the InkAnalyzerBase accesses a partially populated ContextNodeBase
' created by the document model.
If Me.baseDocumentModel.SupportsOnDemandDataProxy Then
AddHandler Me.baseInkAnalyzer.PopulateContextNodeBase, AddressOf Me.PopulateContextNodeBase
End If
' Add the other data proxy related event handlers. These events are raised
' by the InkAnalyzer to communicate parsing results to the document model.
AddHandler Me.baseInkAnalyzer.ContextNodeCreatedBase, _
AddressOf Me.AddContextNodeBase
AddHandler Me.baseInkAnalyzer.ContextNodeDeletingBase, _
AddressOf Me.RemoveContextNodeBase
AddHandler Me.baseInkAnalyzer.ContextNodeLinkAddingBase, _
AddressOf Me.AddContextNodeLinkBase
AddHandler Me.baseInkAnalyzer.ContextNodeLinkDeletingBase, _
AddressOf Me.RemoveContextNodeLinkBase
AddHandler Me.baseInkAnalyzer.ContextNodeMovingToPositionBase, _
AddressOf Me.MoveContextNodeBaseToPosition
AddHandler Me.baseInkAnalyzer.ContextNodePropertiesUpdatedBase, _
AddressOf Me.UpdateContextNodeBaseProperties
AddHandler Me.baseInkAnalyzer.ContextNodeReparentingBase, _
AddressOf Me.ReparentContextNodeBase
AddHandler Me.baseInkAnalyzer.InkAnalyzerStateChangingBase, _
AddressOf Me.InkAnalyzerBase_StateChanging
AddHandler Me.baseInkAnalyzer.StrokesReparentedBase, _
AddressOf Me.ReparentStroke
AddHandler Me.baseInkAnalyzer.IntermediateResultsUpdatedBase, _
AddressOf Me.BaseResultsAvailable
AddHandler Me.baseInkAnalyzer.ResultsUpdatedBase, _
AddressOf Me.BaseResultsAvailable
End Sub 'AttachDataProxyEventHandlers
private void AttachDataProxyEventHandlers()
{
// If the document model supports on demand data proxy, then add an
// event handler for the PopulateContextNodeBase event. This event is raised
// when the InkAnalyzerBase accesses a partially populated ContextNodeBase
// created by the document model.
if (this.baseDocumentModel.SupportsOnDemandDataProxy)
{
this.baseInkAnalyzer.PopulateContextNodeBase +=
new System.Windows.Ink.AnalysisCore.PopulateContextNodeBaseEventHandler(
this.PopulateContextNodeBase);
}
// Add the other data proxy related event handlers. These events are raised
// by the InkAnalyzer to communicate parsing results to the document model.
this.baseInkAnalyzer.ContextNodeCreatedBase +=
new System.Windows.Ink.AnalysisCore.ContextNodeCreatedBaseEventHandler(
this.AddContextNodeBase);
this.baseInkAnalyzer.ContextNodeDeletingBase +=
new System.Windows.Ink.AnalysisCore.ContextNodeDeletingBaseEventHandler(
this.RemoveContextNodeBase);
this.baseInkAnalyzer.ContextNodeLinkAddingBase +=
new System.Windows.Ink.AnalysisCore.ContextNodeLinkAddingBaseEventHandler(
this.AddContextNodeLinkBase);
this.baseInkAnalyzer.ContextNodeLinkDeletingBase +=
new System.Windows.Ink.AnalysisCore.ContextNodeLinkDeletingBaseEventHandler(
this.RemoveContextNodeLinkBase);
this.baseInkAnalyzer.ContextNodeMovingToPositionBase +=
new System.Windows.Ink.AnalysisCore.ContextNodeMovingToPositionBaseEventHandler(
this.MoveContextNodeBaseToPosition);
this.baseInkAnalyzer.ContextNodePropertiesUpdatedBase +=
new System.Windows.Ink.AnalysisCore.ContextNodePropertiesUpdatedBaseEventHandler(
this.UpdateContextNodeBaseProperties);
this.baseInkAnalyzer.ContextNodeReparentingBase +=
new System.Windows.Ink.AnalysisCore.ContextNodeReparentingBaseEventHandler(
this.ReparentContextNodeBase);
this.baseInkAnalyzer.InkAnalyzerStateChangingBase +=
new System.Windows.Ink.AnalysisCore.InkAnalyzerStateChangingBaseEventHandler(
this.InkAnalyzerBase_StateChanging);
this.baseInkAnalyzer.StrokesReparentedBase +=
new System.Windows.Ink.AnalysisCore.StrokesReparentedBaseEventHandler(
this.ReparentStroke);
this.baseInkAnalyzer.IntermediateResultsUpdatedBase +=
new System.Windows.Ink.AnalysisCore.ResultsUpdatedBaseEventHandler(
this.BaseResultsAvailable);
this.baseInkAnalyzer.ResultsUpdatedBase +=
new System.Windows.Ink.AnalysisCore.ResultsUpdatedBaseEventHandler(
this.BaseResultsAvailable);
}
다음 예제에서는 StrokesReparentedBase 이벤트를 처리하는 ReparentStrokes라는 메서드를 정의합니다. 이벤트 정보는 문서 모델 개체인 theDocumentModel에 전달됩니다.
이 예제에서는 문서 모델의 정의를 제공하거나 문서 모델에서 전달된 정보를 처리하는 방법을 보여 주지 않습니다.
''' <summary>
''' Handles the InkAnalyzerBase.StrokeReparentedBase 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 System.Windows.Ink.AnalysisCore.StrokesReparentedBaseEventArgs)
For Each strokeId As Integer In e.ReparentedStrokes
Me.baseDocumentModel.ReparentStroke( _
strokeId, _
e.SourceNode, _
e.DestinationNode, _
CType(sender, System.Windows.Ink.AnalysisCore.InkAnalyzerBase))
Next
End Sub 'ReparentStroke
/// <summary>
/// Handles the InkAnalyzerBase.StrokeReparentedBase event.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
private void ReparentStroke(
object sender, System.Windows.Ink.AnalysisCore.StrokesReparentedBaseEventArgs e)
{
foreach (int strokeId in e.ReparentedStrokes)
{
this.baseDocumentModel.ReparentStroke(
strokeId, e.SourceNode, e.DestinationNode,
(System.Windows.Ink.AnalysisCore.InkAnalyzerBase)sender);
}
}
플랫폼
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
3.0에서 지원