共用方式為


TouchCapabilities 類別

定義

支援判斷任何連線觸控數位板的觸控功能的能力。

public ref class TouchCapabilities sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class TouchCapabilities final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class TouchCapabilities final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class TouchCapabilities
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class TouchCapabilities
function TouchCapabilities()
Public NotInheritable Class TouchCapabilities
繼承
Object Platform::Object IInspectable TouchCapabilities
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

這裡所討論屬性所傳回的值是以連接的觸控數位板總數為基礎:如果一個數位板支援特定功能,而數值屬性會傳回所有數位板所公開的最大值,布林值屬性會傳回 true。

裝置功能範例示範如何偵測輸入裝置是否存在,以及擷取每個裝置的功能和屬性。

下列程式碼示範如何使用這個類別來判斷觸控功能。

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

建構函式

TouchCapabilities()

初始化 TouchCapabilities 類別的新實例。

屬性

Contacts

取得所有數位板支援的連絡人數目下限。

TouchPresent

取得值,這個值表示是否偵測到觸控數位板。

適用於

另請參閱