Kha*_*aji 5 .net wpf touchscreen c#-4.0
如何辨别我正在使用的设备是否有触摸屏?我想的是:
SystemParameters.IsPenWindows
Run Code Online (Sandbox Code Playgroud)
foreach (TabletDevice tabletDevice in Tablet.TabletDevices)
{
if(tabletDevice.Type == TabletDeviceType.Touch)
return true;
}
Run Code Online (Sandbox Code Playgroud)
您还可以参考这个: Is it possible to let my c# wpf program Know if the user has a touchscreen or not?