InkAnalyzer.ContextNodeLinkDeleting-Ereignis
Tritt auf, bevor der InkAnalyzer einen ContextLink zwischen zwei ContextNode-Objekten entfernt.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public Event ContextNodeLinkDeleting As ContextNodeLinkDeletingEventHandler
'Usage
Dim instance As InkAnalyzer
Dim handler As ContextNodeLinkDeletingEventHandler
AddHandler instance.ContextNodeLinkDeleting, handler
public event ContextNodeLinkDeletingEventHandler ContextNodeLinkDeleting
public:
event ContextNodeLinkDeletingEventHandler^ ContextNodeLinkDeleting {
void add (ContextNodeLinkDeletingEventHandler^ value);
void remove (ContextNodeLinkDeletingEventHandler^ value);
}
/** @event */
public void add_ContextNodeLinkDeleting (ContextNodeLinkDeletingEventHandler value)
/** @event */
public void remove_ContextNodeLinkDeleting (ContextNodeLinkDeletingEventHandler value)
JScript unterstützt keine Ereignisse.
Hinweise
Verwenden Sie dieses Ereignis, wenn Ihre Anwendung über eine eigene Datenstruktur verfügt, die mit der Datenstruktur des InkAnalyzer synchronisiert wird. Dieses Ereignis tritt während der Abgleichphase der Freihandanalyse oder als Antwort auf eine InkAnalyzer-Methode auf, die einen ContextLink zwischen zwei [T:System.Windows.Ink.ContextNode objects]-Objekten entfernt.
Weitere Informationen zum Synchronisieren von Anwendungsdaten mit InkAnalyzer finden Sie unter Data Proxy with Ink Analysis.
Beispiele
In diesem Beispiel wird eine Methode mit dem Namen AttachDataProxyEventHandlers definiert, die Datenproxyereignishandler an einen InkAnalyzer mit dem Namen theInkAnalyzer anfügt.
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.ReparentStrokes
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 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 ContextNodeCreatedEventHandler(
this.AddContextNode);
this.theInkAnalyzer.ContextNodeDeleting +=
new ContextNodeDeletingEventHandler(
this.RemoveContextNode);
this.theInkAnalyzer.ContextNodeLinkAdding +=
new ContextNodeLinkAddingEventHandler(
this.AddContextNodeLink);
this.theInkAnalyzer.ContextNodeLinkDeleting +=
new ContextNodeLinkDeletingEventHandler(
this.RemoveContextNodeLink);
this.theInkAnalyzer.ContextNodeMovingToPosition +=
new ContextNodeMovingToPositionEventHandler(
this.MoveContextNodeToPosition);
this.theInkAnalyzer.ContextNodePropertiesUpdated +=
new ContextNodePropertiesUpdatedEventHandler(
this.UpdateContextNodeProperties);
this.theInkAnalyzer.ContextNodeReparenting +=
new ContextNodeReparentingEventHandler(
this.ReparentContextNode);
this.theInkAnalyzer.InkAnalyzerStateChanging +=
new InkAnalyzerStateChangingEventHandler(
this.InkAnalyzer_StateChanging);
this.theInkAnalyzer.StrokesReparented +=
new StrokesReparentedEventHandler(
this.ReparentStrokes);
this.theInkAnalyzer.IntermediateResultsUpdated +=
new ResultsUpdatedEventHandler(
this.ResultsAvailable);
this.theInkAnalyzer.ResultsUpdated +=
new ResultsUpdatedEventHandler(
this.ResultsAvailable);
}
Im folgenden Beispiel wird die RemoveContextNodeLink-Methode definiert, die das ContextNodeLinkDeleting-Ereignis behandelt. Die Ereignisinformationen werden an das Dokumentmodellobjekt mit dem Namen theDocumentModel übergeben.
Dieses Beispiel liefert nicht die Definition des Dokumentmodells und veranschaulicht nicht, wie die übergebenen Informationen verarbeitet werden.
'/ <summary>
'/ Handles the InkAnalyzer.ContextNodeLinkDeleting event.
'/ </summary>
'/ <param name="sender">The source of the event.</param>
'/ <param name="e">The event data.</param>
Private Sub RemoveContextNodeLink(ByVal sender As Object, ByVal e As ContextNodeLinkDeletingEventArgs)
Me.theDocumentModel.RemoveLink(e.LinkToBeDeleted)
End Sub 'RemoveContextNodeLink
/// <summary>
/// Handles the InkAnalyzer.ContextNodeLinkDeleting event.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The event data.</param>
private void RemoveContextNodeLink(
object sender, ContextNodeLinkDeletingEventArgs e)
{
this.theDocumentModel.RemoveLink(e.LinkToBeDeleted);
}
Plattformen
Windows Vista
.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.
Versionsinformationen
.NET Framework
Unterstützt in: 3.0