共用方式為


DrawingAttributes.AttributeChanged 事件

定義

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

適用於