DrawingAttributes.AttributeChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在 DrawingAttributes 物件中的屬性變更時發生。
public:
event System::Windows::Ink::PropertyDataChangedEventHandler ^ AttributeChanged;
public event System.Windows.Ink.PropertyDataChangedEventHandler AttributeChanged;
member this.AttributeChanged : System.Windows.Ink.PropertyDataChangedEventHandler
Public Custom Event AttributeChanged As PropertyDataChangedEventHandler
Public Event AttributeChanged As PropertyDataChangedEventHandler
事件類型
範例
下列範例會處理 AttributeChanged 事件。 此範例假設有名為 DrawingAttributesinkDA
的物件,而且 AttributeChanged 事件已連線到此範例中所定義的事件處理常式。
void inkDA_AttributeChanged(object sender, PropertyDataChangedEventArgs e)
{
if (e.PropertyGuid == DrawingAttributeIds.Color)
{
this.Title = "The pen color is: " + e.NewValue.ToString();
}
}
Private Sub inkDA_AttributeChanged(ByVal sender As Object, _
ByVal e As PropertyDataChangedEventArgs)
If (e.PropertyGuid = DrawingAttributeIds.Color) Then
Me.Title = "The pen color is: " + e.NewValue.ToString()
End If
End Sub