StrokeCollection.PropertyDataChanged 活動
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當自訂屬性從 中新增或移除 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 事件。 此範例假設存在呼叫GuiddateTimeGuid,且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