Język

StrokeCollection.PropertyDataChanged Zdarzenie

Definicja

Występuje, gdy właściwość niestandardowa jest dodawana lub usuwana z obiektu StrokeCollection.

public:
 event System::Windows::Ink::PropertyDataChangedEventHandler ^ PropertyDataChanged;
public event System.Windows.Ink.PropertyDataChangedEventHandler PropertyDataChanged;
member this.PropertyDataChanged : System.Windows.Ink.PropertyDataChangedEventHandler 
Public Custom Event PropertyDataChanged As PropertyDataChangedEventHandler 
Public Event PropertyDataChanged As PropertyDataChangedEventHandler 

Typ zdarzenia

Przykłady

W poniższym przykładzie pokazano, jak obsługiwać PropertyDataChanged zdarzenie. W tym przykładzie przyjęto założenie, że istnieje wywołanieGuid, a dateTimeGuid zdarzenie jest połączone z procedurą PropertyDataChanged obsługi zdarzeń zdefiniowaną w tym przykładzie.

void Strokes_PropertyDataChanged(object sender, PropertyDataChangedEventArgs e)
{
    if ((e.PropertyGuid == dateTimeGuid) && (e.NewValue is DateTime))
    {
        MessageBox.Show("The timestamp for the strokes is " +
            ((DateTime)e.NewValue).ToString());
    }
}
Private Sub Strokes_PropertyDataChanged(ByVal sender As Object, _
    ByVal e As PropertyDataChangedEventArgs)

    If (e.PropertyGuid = dateTimeGuid) And (TypeOf e.NewValue Is DateTime) Then
        MessageBox.Show("The timestamp for the strokes is " & _
            (CType(e.NewValue, DateTime)).ToString())
    End If

End Sub

Dotyczy