Recognizer.PreferredPacketDescription Property
Gets an array of type Guid that represents the preferred packet properties for the recognizer.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public ReadOnly Property PreferredPacketDescription As Guid()
'Usage
Dim instance As Recognizer
Dim value As Guid()
value = instance.PreferredPacketDescription
public Guid[] PreferredPacketDescription { get; }
public:
property array<Guid>^ PreferredPacketDescription {
array<Guid>^ get ();
}
public function get PreferredPacketDescription () : Guid[]
Property Value
Type: array<System.Guid[]
Represents the preferred packet properties for the recognizer.
Remarks
The PreferredPacketDescription property describes the contents of a packet and does not allow access to the data that the packet contains.
The PreferredPacketDescription property lists the packet properties that the recognizer uses to complete recognition. For all of the Microsoft® recognizers, the PreferredPacketDescription property refers to the data describing (x,y) coordinates within a Stroke object. This data is represented by the X and Y fields of the PacketProperty object. A packet contains this point data as well as other data that is related to that stroke, such as the pressure of the pen that made the stroke, the angle of the pen, and so on. The Microsoft recognizers ignore pressure, tilt, and other packet properties.
Examples
This C# example creates a function that returns true if the Recognizer object, theRecognizer, has X as one of its preferred packet descriptions.
using Microsoft.Ink;
// . . .
public bool PrefersX(Recognizer theRecognizer)
{
Guid[] theDescription =
theRecognizer.PreferredPacketDescription;
for (int i = 0; i < theDescription.Length; i++)
{
if (theDescription[i] == PacketProperty.X)
return true;
}
return false;
}
This Microsoft Visual Basic® .NET example creates a function that returns true if the Recognizer object, theRecognizer, has X as one of its preferred packet descriptions.
Imports Microsoft.Ink
' . . .
Public Function PrefersX(ByVal theRecognizer As Recognizer) As Boolean
Dim theDescription () As Guid
TheDescription = theRecognizer.PreferredPacketDescription
Dim k As Integer
For k = 0 To theDescription.Length
If theDescription(k).ToString() = PacketProperty.X.ToString() Then
Return True
End If
Next
Return False
End Function
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0