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 事件。 此示例假定有一 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