Bagikan melalui


DrawingAttributes.AttributeChanged Kejadian

Definisi

Terjadi ketika properti dalam DrawingAttributes objek berubah.

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 

Jenis Acara

Contoh

Contoh berikut menangani AttributeChanged peristiwa. Contoh ini mengasumsikan bahwa ada objek yang DrawingAttributes disebut inkDA dan bahwa AttributeChanged peristiwa terhubung ke penanganan aktivitas yang ditentukan dalam contoh ini.

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

Berlaku untuk