TabletDeviceType 列舉

定義

定義 Tablet 裝置所使用的裝置型別值。

C#
public enum TabletDeviceType
繼承
TabletDeviceType

欄位

名稱 Description
Stylus 0

表示 Tablet 裝置為手寫筆。

Touch 1

表示 Tablet 裝置為觸控式螢幕。

範例

下列範例示範如何判斷平板電腦裝置的類型。

C#
// Get the type of tablet device
TabletDeviceType myTabletDeviceType = myTabletDevice.Type;

// Display the type of tablet device
textbox1.AppendText("Type: ");

switch (myTabletDeviceType)
{
    case TabletDeviceType.Stylus:
        textbox1.AppendText("Stylus\n");
        break;

    default: // TabletDeviceType.Touch:
        textbox1.AppendText("Touch Pad\n");
        break;
}

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9