解决方法
在C#代码中,通过在PresentationCore中使用System.
Windows.Input命名空间来确定触摸屏是否存在(不检查它是单个或多点触摸设备).
public bool HasTouchInput() { foreach (TabletDevice tabletDevice in Tablet.TabletDevices) { //Only detect if it is a touch Screen not how many touches (i.e. Single touch or Multi-touch) if(tabletDevice.Type == TabletDeviceType.Touch) return true; } return false; }