TabletPropertyDescription 類別
說明由數位板報告的 PacketProperty。
命名空間: Microsoft.Ink
組件: Microsoft.Ink (在 Microsoft.Ink.dll 中)
語法
'宣告
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Class TabletPropertyDescription
'用途
Dim instance As TabletPropertyDescription
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class TabletPropertyDescription
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public ref class TabletPropertyDescription
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
public class TabletPropertyDescription
public class TabletPropertyDescription
備註
這個物件包含 PacketProperty 的度量資訊。
範例
在這個範例中,會建立 TabletPropertyDescriptionCollection 集合,而且會將指定的 Tablet 物件所支援的每個封包屬性的 TabletPropertyDescription 物件填入集合。
Private Function GetPropertyDescriptionCollection(ByVal theTablet As Tablet) As TabletPropertyDescriptionCollection
Dim Result As TabletPropertyDescriptionCollection = New TabletPropertyDescriptionCollection()
For Each PropertyID As Guid In GetPacketPropertyList()
If theTablet.IsPacketPropertySupported(PropertyID) Then
' get the property metrics
Dim Metrics As TabletPropertyMetrics = theTablet.GetPropertyMetrics(PropertyID)
' add to the collection
Result.Add(New TabletPropertyDescription(PropertyID, Metrics))
End If
Next
Return Result
End Function
' returns a list of all Packet Property Guids
Private Function GetPacketPropertyList() As List(Of Guid)
Dim Result As List(Of Guid) = New List(Of Guid)()
Result.Add(PacketProperty.AltitudeOrientation)
Result.Add(PacketProperty.AzimuthOrientation)
Result.Add(PacketProperty.ButtonPressure)
Result.Add(PacketProperty.Height)
Result.Add(PacketProperty.NormalPressure)
Result.Add(PacketProperty.PacketStatus)
Result.Add(PacketProperty.PitchRotation)
Result.Add(PacketProperty.RollRotation)
Result.Add(PacketProperty.SerialNumber)
Result.Add(PacketProperty.SystemTouch)
Result.Add(PacketProperty.TangentPressure)
Result.Add(PacketProperty.TimerTick)
Result.Add(PacketProperty.TwistOrientation)
Result.Add(PacketProperty.Width)
Result.Add(PacketProperty.X)
Result.Add(PacketProperty.XTiltOrientation)
Result.Add(PacketProperty.Y)
Result.Add(PacketProperty.YawRotation)
Result.Add(PacketProperty.YTiltOrientation)
Result.Add(PacketProperty.Z)
Return Result
End Function
private TabletPropertyDescriptionCollection GetPropertyDescriptionCollection(Tablet theTablet)
{
TabletPropertyDescriptionCollection Result = new TabletPropertyDescriptionCollection();
foreach (Guid PropertyID in GetPacketPropertyList())
{
if (theTablet.IsPacketPropertySupported(PropertyID))
{
// get the property metrics
TabletPropertyMetrics Metrics = theTablet.GetPropertyMetrics(PropertyID);
// add to the collection
Result.Add(new TabletPropertyDescription(PropertyID, Metrics));
}
}
return Result;
}
// returns a list of all Packet Property Guids
private List<Guid> GetPacketPropertyList()
{
List<Guid> Result = new List<Guid>();
Result.Add(PacketProperty.AltitudeOrientation);
Result.Add(PacketProperty.AzimuthOrientation);
Result.Add(PacketProperty.ButtonPressure);
Result.Add(PacketProperty.Height);
Result.Add(PacketProperty.NormalPressure);
Result.Add(PacketProperty.PacketStatus);
Result.Add(PacketProperty.PitchRotation);
Result.Add(PacketProperty.RollRotation);
Result.Add(PacketProperty.SerialNumber);
Result.Add(PacketProperty.SystemTouch);
Result.Add(PacketProperty.TangentPressure);
Result.Add(PacketProperty.TimerTick);
Result.Add(PacketProperty.TwistOrientation);
Result.Add(PacketProperty.Width);
Result.Add(PacketProperty.X);
Result.Add(PacketProperty.XTiltOrientation);
Result.Add(PacketProperty.Y);
Result.Add(PacketProperty.YawRotation);
Result.Add(PacketProperty.YTiltOrientation);
Result.Add(PacketProperty.Z);
return Result;
}
繼承階層架構
System.Object
Microsoft.Ink.TabletPropertyDescription
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。
平台
Windows Vista
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0