StrokeCollection.StrokesChanged Event


Occurs when a Stroke in the collection changes.

Namespace:   System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)

Public Event StrokesChanged As StrokeCollectionChangedEventHandler

The following example adds the current time as a custom property to each new stroke in the StrokesChanged event handler. The example assumes that the StrokesChanged event is connected to the event handler defined in this example.

Dim currentTimeGuid As Guid = New Guid("12345678-1234-1234-1234-123456789012")

Private Sub Strokes_StrokesChanged(ByVal sender As Object, _
            ByVal args As StrokeCollectionChangedEventArgs)

    Dim s As Stroke

    For Each s In args.Added
        s.AddPropertyData(currentTimeGuid, DateTime.Now)

End Sub

.NET Framework
Available since 3.0
Return to top