Partilhar via


StrokeCollection.StrokesChanged Evento

Definição

Ocorre quando um Stroke nesta coleção é alterada.

public:
 event System::Windows::Ink::StrokeCollectionChangedEventHandler ^ StrokesChanged;
public event System.Windows.Ink.StrokeCollectionChangedEventHandler StrokesChanged;
member this.StrokesChanged : System.Windows.Ink.StrokeCollectionChangedEventHandler 
Public Custom Event StrokesChanged As StrokeCollectionChangedEventHandler 
Public Event StrokesChanged As StrokeCollectionChangedEventHandler 

Tipo de evento

Exemplos

O exemplo a seguir adiciona a hora atual como uma propriedade personalizada a cada novo traço no StrokesChanged manipulador de eventos. O exemplo pressupõe que o StrokesChanged evento esteja conectado ao manipulador de eventos definido neste exemplo.

Guid currentTimeGuid = new Guid("12345678-1234-1234-1234-123456789012");

void Strokes_StrokesChanged(object sender, StrokeCollectionChangedEventArgs args)
{
    foreach (Stroke s in args.Added)
    {
        s.AddPropertyData(currentTimeGuid, DateTime.Now);
    }
}
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

Aplica-se a