Tablets.IsPacketPropertySupported Method
Tablets.IsPacketPropertySupported Method |
Returns a value that indicates whether a PacketProperty field, identified with a globally unique identifier (GUID), is supported by all Tablet objects in this Tablets collection.
Definition
Visual Basic .NET Public Function IsPacketPropertySupported( _
ByVal g As Guid _
) As BooleanC# public bool IsPacketPropertySupported(
Guid g
);Managed C++ public: bool* IsPacketPropertySupported(
Guid *g
);
Parameters
g System.Guid. The Guid identifier for the requested PacketProperty field.
Return Value
System.Boolean. Returns a value that indicates whether a PacketProperty field, identified with a globally unique identifier (GUID), is supported by all Tablet objects in this Tablets collection.
true
The PacketProperty field is supported throughout this Tablets collection. false
The PacketProperty field is not supported throughout this Tablets collection.
Remarks
This method determines if a Tablets collection supports various fields of the PacketProperty class.
Note: When this method is called on the Tablets collection, it queries all of the tablets on the system. If any of them does not support the property, it returns
false
. Call the Tablet.IsPacketPropertySupported method on an individual Tablet object to determine whether the device supports a known property.
Examples
[C#]
This C# example reports which PacketProperty fields are available for all Tablet objects in the Tablets collection, allTablets.
using Microsoft.Ink; // . . . public string ReportOnAllTablets() { Tablets allTablets = new Tablets(); string theReport = ""; // Report on which PacketProperties are supported for all tablets. theReport += "PacketProperties Supported:"; theReport += allTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation) ? "AltitudeOrientation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation) ? "AzimuthOrientation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure) ? "ButtonPressure " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.NormalPressure) ? "NormalPressure " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.PacketStatus) ? "PacketStatus " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.PitchRotation) ? "PitchRotation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.RollRotation) ? "RollRotation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.SerialNumber) ? "SerialNumber " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.TangentPressure) ? "TangentPressure " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.TimerTick) ? "TimerTick " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation) ? "TwistOrientation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.X) ? "X " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation) ? "XTiltOrientation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.Y) ? "Y " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.YawRotation) ? "YawRotation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation) ? "YTiltOrientation " : ""; theReport += allTablets.IsPacketPropertySupported(PacketProperty.Z) ? "Z " : ""; return theReport; }
[VB.NET]
This Microsoft® Visual Basic® .NET example reports which PacketProperty fields are available for all Tablet objects in the Tablets collection, allTablets.
Imports Microsoft.Ink ' . . . Public Function ReportOnAllTablets() As String Dim allTablets As Tablets = New Tablets() ' Report on which PacketProperties are supported for all tablets. Dim theReport As String = "IsPacketPropertySupported: " If allTablets.IsPacketPropertySupported(PacketProperty.AltitudeOrientation) Then theReport &= "AltitudeOrientation " End If If allTablets.IsPacketPropertySupported(PacketProperty.AzimuthOrientation) Then theReport &= "AzimuthOrientation " End If If allTablets.IsPacketPropertySupported(PacketProperty.ButtonPressure) Then theReport &= "ButtonPressure " End If If allTablets.IsPacketPropertySupported(PacketProperty.NormalPressure) Then theReport &= "NormalPressure " End If If allTablets.IsPacketPropertySupported(PacketProperty.PacketStatus) Then theReport &= "PacketStatus " End If If allTablets.IsPacketPropertySupported(PacketProperty.PitchRotation) Then theReport &= "PitchRotation " End If If allTablets.IsPacketPropertySupported(PacketProperty.RollRotation) Then theReport &= "RollRotation " End If If allTablets.IsPacketPropertySupported(PacketProperty.SerialNumber) Then theReport &= "SerialNumber " End If If allTablets.IsPacketPropertySupported(PacketProperty.TangentPressure) Then theReport &= "TangentPressure " End If If allTablets.IsPacketPropertySupported(PacketProperty.TimerTick) Then theReport &= "TimerTick " End If If allTablets.IsPacketPropertySupported(PacketProperty.TwistOrientation) Then theReport &= "TwistOrientation " End If If allTablets.IsPacketPropertySupported(PacketProperty.X) Then theReport &= "X " End If If allTablets.IsPacketPropertySupported(PacketProperty.XTiltOrientation) Then theReport &= "XTiltOrientation " End If If allTablets.IsPacketPropertySupported(PacketProperty.Y) Then theReport &= "Y " End If If allTablets.IsPacketPropertySupported(PacketProperty.YawRotation) Then theReport &= "YawRotation " End If If allTablets.IsPacketPropertySupported(PacketProperty.YTiltOrientation) Then theReport &= "YTiltOrientation " End If If allTablets.IsPacketPropertySupported(PacketProperty.Z) Then theReport &= "Z " End If Return theReport End Function
See Also