Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TouchCapabilities.TouchPresent | touchPresent property

Applies to Windows and Windows Phone

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

Syntax


var touchPresent = touchCapabilities.touchPresent;

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

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:
© 2014 Microsoft