StrokeCollection.PropertyDataChanged 事件

定義

發生於當自訂屬性加入至 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 

事件類型

範例

下列範例示範如何處理 PropertyDataChanged 事件。 這個範例假設有一個 Guid 呼叫 dateTimeGuid 的 ,而且 PropertyDataChanged 事件會連接到此範例中定義的事件處理常式。

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

適用於