InkCollectorNewPacketsEventArgs.Stroke - свойство
Обновлен: Ноябрь 2007
Gets the Stroke object that generated the NewPackets event.
Пространство имен: 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
The object that generated the NewPackets event.
Примеры
In this example, an InkCollectorNewPacketsEventHandler instance obtains the X and Y values of the last packet passed via the InkCollectorNewPacketsEventArgs object. The X and Y values are always in the first two positions of the packet data.
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 - члены