PointerDeviceType PointerDeviceType PointerDeviceType PointerDeviceType PointerDeviceType Enum

Definition

Enumerates pointer device types.

public : enum class PointerDeviceType
enum class winrt::Windows::Devices::Input::PointerDeviceType : int32_t
public enum PointerDeviceType
Public Enum PointerDeviceType
var value = Windows.Devices.Input.PointerDeviceType.mouse;
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 2

Mouse

Pen Pen Pen Pen Pen 1

Pen

Touch Touch Touch Touch Touch 0

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