TouchCapabilities TouchCapabilities TouchCapabilities TouchCapabilities Class

Definition

Supports the ability to determine the touch capabilities of any connected touch digitizers.

public sealed class TouchCapabilitiespublic sealed class TouchCapabilitiesPublic NotInheritable Class TouchCapabilitiespublic sealed class TouchCapabilities
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The values returned by the properties discussed here are based on the total number of touch digitizers connected: Boolean properties return true if one digitizer supports a specific capability and numeric properties return the maximum value exposed by all digitizers.

The Device Capabilities Sample demonstrates how to detect the presence of input devices and retrieve the capabilities and attributes of each device.

The following code shows how to use this class to determine touch capabilities.

    function getTouchCapabilities() {
        var touchCapabilities = new Windows.Devices.Input.TouchCapabilities();
        id("contacts").innerHTML = touchCapabilities.Contacts;
    }

Constructors

TouchCapabilities() TouchCapabilities() TouchCapabilities() TouchCapabilities()

Initializes a new instance of the @Windows.Devices.Input.TouchCapabilities.#ctor class.

public TouchCapabilities()public New()Public Sub New()public TouchCapabilities()
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Contacts Contacts Contacts Contacts

Gets the minimum number of contacts supported by all the digitizers.

public uint Contacts { get; }public uint Contacts { get; }Public ReadOnly Property Contacts As uintpublic uint Contacts { get; }
Value
uint uint uint uint

Gets the minimum number of contacts supported by all the digitizers.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

TouchPresent TouchPresent TouchPresent TouchPresent

Gets a value that indicates whether a touch digitizer is detected.

public int TouchPresent { get; }public int TouchPresent { get; }Public ReadOnly Property TouchPresent As intpublic int TouchPresent { get; }
Value
int int int int

The number of touch digitizers detected. Typically 0 or 1.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

This property always returns 1 if an instance of the Microsoft Visual Studio simulator is running.