PointerDeviceType PointerDeviceType PointerDeviceType PointerDeviceType Enum

Definition

Enumerates pointer device types.

public : enum class PointerDeviceTypepublic enum PointerDeviceTypePublic Enum PointerDeviceType// You can use this enum in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Fields

Mouse Mouse Mouse Mouse

Mouse

Pen Pen Pen Pen

Pen

Touch Touch Touch Touch

A touch-enabled device

Examples

The following example shows how to use the PointerDeviceType enumeration.

    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";
    }