StrokesEventHandler Delegate
Represents the method that handles events for adding and removing Strokes on the Ink object, InkOverlay object, InkPicture control, and Strokes collection.
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
'Declaration Public Delegate Sub StrokesEventHandler ( _ sender As Object, _ e As StrokesEventArgs _ ) 'Usage Dim instance As New StrokesEventHandler(AddressOf HandlerMethod)
Parameters
- sender
- Type: System.Object
- e
- Type: Microsoft.Ink.StrokesEventArgs
The StrokesEventArgs object that contains the event data.
When you create a StrokesEventHandler delegate, you identify the method that handles the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.
The StrokesEventHandler delegate is used to implement the InkAdded, InkDeleted, StrokesAdded, and StrokesRemoved event handlers.
In this example, an InkAdded event handler writes information about the added strokes to a list box control.
Private Sub Ink_InkAdded(ByVal sender As Object, ByVal e As StrokesEventArgs) ' since this event fires in all modes, we will check EditingMode ' and examine the StrokeIds only if we are currently in mode: InkOverlayEditingMode.Ink If InkOverlayEditingMode.Ink = Me.mInkOverlay.EditingMode Then For Each id As Integer In e.StrokeIds Me.listBoxStrokeId.Items.Add("Added ID:" + id.ToString()) Next End If End Sub
In this example an InkDeleted event handler writes information about the deleted strokes to a list box control.
Private Sub Ink_InkDeleted(ByVal sender As Object, ByVal e As StrokesEventArgs) ' since this event fires in select mode also, we will check EditingMode ' and examine the StrokeIds only if we are currently in mode: InkOverlayEditingMode.Delete If InkOverlayEditingMode.Delete = Me.mInkOverlay.EditingMode Then For Each id As Integer In e.StrokeIds Me.listBoxStrokeId.Items.Add("Deleted ID:" + id.ToString()) Next End If End Sub
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.