TouchCapabilities TouchCapabilities TouchCapabilities TouchCapabilities Class

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

Syntax

Declaration

public sealed class TouchCapabilitiespublic sealed class TouchCapabilitiesPublic NotInheritable Class TouchCapabilities

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 summary

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

Properties summary

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

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

Constructors

  • TouchCapabilities()
    TouchCapabilities()
    TouchCapabilities()
    TouchCapabilities()

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

    public TouchCapabilities()public TouchCapabilities()Public Function TouchCapabilities() As

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 uint

    Property Value

    • uint
      uint
      uint
      uint

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

  • 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 int

    Property Value

    • int
      int
      int
      int

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

    Remarks

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.Devices.Input.dll