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
'DeclarationPublicEvent StrokesChanged As StrokeCollectionChangedEventHandler
'UsageDim instance As StrokeCollection
Dim handler As StrokeCollectionChangedEventHandler
AddHandler instance.StrokesChanged, handler
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")
PrivateSub Strokes_StrokesChanged(ByVal sender AsObject, _
ByVal args As StrokeCollectionChangedEventArgs)
Dim s As Stroke
ForEach s In args.Added
s.AddPropertyData(currentTimeGuid, DateTime.Now)
NextEndSub
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.