PointerDeviceType Enumeration

Definition

Listet Zeigergerätetypen auf.

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
Vererbung
PointerDeviceType
Attribute

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Felder

Mouse 2

Maus

Pen 1

Stift

Touch 0

Ein Gerät mit Toucheingabe

Beispiele

Das folgende Beispiel zeigt, wie die PointerDeviceType-Enumeration verwendet wird.

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

Gilt für: