共用方式為


InkCollectorNewPacketsEventArgs.PacketCount Property

InkCollectorNewPacketsEventArgs.PacketCount Property

Gets the number of packets received for a Stroke object.

Definition

Visual Basic .NET Public ReadOnly Property PacketCount As Integer
C# public int PacketCount { get; }
Managed C++ public: __property int* get_PacketCount();

Property Value

System.Int32. The number of packets received for a Stroke object.

This property is read-only. This property has no default value.

Examples

[C#]

This C# example demonstrates an event handler for new packets for an InkOverlay, and how you might loop over the packet data to analyze it.

private void theInkOverlay_NewPackets(object sender,
            Microsoft.Ink.InkCollectorNewPacketsEventArgs e)
{
  for (int i = 0; i < e.PacketCount; i++)
  {
    // Analyze packet data
    // ...
  }
}

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example demonstrates an event handler for new packets for an InkOverlay, and how you might loop over the packet data to analyze it.

Private Sub theInkOverlay_NewPackets(ByVal sender As Object, ByVal e As Microsoft.Ink.InkCollectorNewPacketsEventArgs) _
Handles theInkOverlay.NewPackets
    Dim index As Integer
    For index = 0 To e.PacketCount - 1
        'Analyze packet data
        '...
    Next
End Sub

See Also