This documentation is archived and is not being maintained.

StrokeCollection.StrokesChanged Event

Occurs when a Stroke in the collection changes.

Namespace:  System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

'Declaration
Public Event StrokesChanged As StrokeCollectionChangedEventHandler
'Usage
Dim instance As StrokeCollection 
Dim handler As StrokeCollectionChangedEventHandler 

AddHandler instance.StrokesChanged, handler
<object StrokesChanged="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)
    Next 

End Sub

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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.

.NET Framework

Supported in: 3.5, 3.0
Show: