StrokeCollection.StrokesChanged 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当集合内的 Stroke 更改时发生。
public:
event System::Windows::Ink::StrokeCollectionChangedEventHandler ^ StrokesChanged;
public event System.Windows.Ink.StrokeCollectionChangedEventHandler StrokesChanged;
member this.StrokesChanged : System.Windows.Ink.StrokeCollectionChangedEventHandler
Public Custom Event StrokesChanged As StrokeCollectionChangedEventHandler
Public Event StrokesChanged As StrokeCollectionChangedEventHandler
事件类型
示例
以下示例将当前时间作为自定义属性添加到事件处理程序中的每个 StrokesChanged 新笔划。 该示例假定 事件 StrokesChanged 已连接到此示例中定义的事件处理程序。
Guid currentTimeGuid = new Guid("12345678-1234-1234-1234-123456789012");
void Strokes_StrokesChanged(object sender, StrokeCollectionChangedEventArgs args)
{
foreach (Stroke s in args.Added)
{
s.AddPropertyData(currentTimeGuid, DateTime.Now);
}
}
Dim currentTimeGuid As Guid = New Guid("12345678-1234-1234-1234-123456789012")
Private Sub Strokes_StrokesChanged(ByVal sender As Object, _
ByVal args As StrokeCollectionChangedEventArgs)
Dim s As Stroke
For Each s In args.Added
s.AddPropertyData(currentTimeGuid, DateTime.Now)
Next
End Sub