Udostępnij przez


DrawingAttributes.AttributeChanged Zdarzenie

Definicja

Występuje, gdy zmienia się właściwość w DrawingAttributes obiekcie.

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 

Typ zdarzenia

Przykłady

Poniższy przykład obsługuje AttributeChanged zdarzenie. W tym przykładzie przyjęto założenie, że istnieje obiekt o nazwie inkDA i że AttributeChanged zdarzenie jest połączone z procedurą DrawingAttributes obsługi zdarzeń zdefiniowaną w tym przykładzie.

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

Dotyczy