PointerDeviceType 列挙型

定義

ポインター デバイスの種類を列挙します。

public enum class PointerDeviceType
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class PointerDeviceType
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum PointerDeviceType
var value = Windows.Devices.Input.PointerDeviceType.touch
Public Enum PointerDeviceType
継承
PointerDeviceType
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

フィールド

Mouse 2

マウス

Pen 1

ペン

Touch 0

タッチ対応デバイス

次の例は、PointerDeviceType 列挙を使用する方法を示しています。

function getPointerDeviceType(pdt)
{
    switch(pdt)
    {
        case Windows.Devices.Input.PointerDeviceType.touch:
            return "Touch";

        case Windows.Devices.Input.PointerDeviceType.pen:
            return "Pen";

        case Windows.Devices.Input.PointerDeviceType.mouse:
            return "Mouse";
    }
    return "Undefined";
}

適用対象