InkCollectorNewPacketsEventArgs.Stroke 属性

获取生成 NewPackets 事件的 Stroke 对象。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public ReadOnly Property Stroke As Stroke
用法
Dim instance As InkCollectorNewPacketsEventArgs
Dim value As Stroke

value = instance.Stroke
public Stroke Stroke { get; }
public:
property Stroke^ Stroke {
    Stroke^ get ();
}
/** @property */
public Stroke get_Stroke()
public function get Stroke () : Stroke

属性值

类型:Microsoft.Ink.Stroke
生成 NewPackets 事件的对象。

示例

在此示例中,InkCollectorNewPacketsEventHandler 实例获取通过 InkCollectorNewPacketsEventArgs 对象传递的最后一个数据包的 XY 值。XY 值总是位于数据包数据的前两个位置。

Private Sub mInkObject_NewPackets2(ByVal sender As Object, ByVal e As InkCollectorNewPacketsEventArgs)
    Dim DescriptorsPerPacket As Integer = e.Stroke.PacketDescription.Length
    Dim LastX As Integer = e.PacketData(DescriptorsPerPacket * (e.PacketCount - 1))
    Dim LastY As Integer = e.PacketData((DescriptorsPerPacket * (e.PacketCount - 1)) + 1)
End Sub
private void mInkObject_NewPackets2(object sender, InkCollectorNewPacketsEventArgs e)
{

    int DescriptorsPerPacket = e.Stroke.PacketDescription.Length;
    int LastX = e.PacketData[DescriptorsPerPacket * (e.PacketCount - 1)];
    int LastY = e.PacketData[(DescriptorsPerPacket * (e.PacketCount - 1)) + 1];

}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkCollectorNewPacketsEventArgs 类

InkCollectorNewPacketsEventArgs 成员

Microsoft.Ink 命名空间

InkCollector.NewPackets