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 事件。 此示例假定有一 DrawingAttributes 个名为 inkDA 的对象,并且该 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

适用于