TouchCapabilities.TouchPresent | touchPresent property

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

Syntax


Public ReadOnly Property TouchPresent As Integer

Property value

Type: Number [JavaScript] | System.Int32 [.NET] | int32 [C++]

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.

Examples

The following code shows how to use this method.


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


Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Devices.Input
Windows::Devices::Input [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Devices.Input
Windows::Devices::Input [C++]

Metadata

Windows.winmd

See also

TouchCapabilities
Quickstarts
Quickstart: Identifying input devices

 

 

Show:
© 2015 Microsoft