有没有一种方法来确定当前的屏幕支持触控? [英] Is there a way to determine if the current screen supports touch?

查看:122
本文介绍了有没有一种方法来确定当前的屏幕支持触控?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  

可能重复:
  <一href="http://stackoverflow.com/questions/5673556/is-it-possible-to-let-my-c-sharp-wpf-program-know-if-the-user-has-a-touchscreen">Is它可以让我的C#WPF程序知道用户是否有触摸屏或不?

我怎样才能知道我工作的设备具有触摸屏?我想是这样的:

  SystemParameters.IsPenWindows
 

解决方案

 的foreach(TabletDevice tabletDevice在Tablet.TabletDevices)
        {

            如果(tabletDevice.Type == TabletDeviceType.Touch)
                返回true;
        }
 

您也可以参考这个: <一href="http://stackoverflow.com/questions/5673556/is-it-possible-to-let-my-c-sharp-wpf-program-know-if-the-user-has-a-touchscreen">Is它可以让我的C#WPF程序知道用户是否有触摸屏或不? <一个href="http://stackoverflow.com/questions/5673556/is-it-possible-to-let-my-c-sharp-wpf-program-know-if-the-user-has-a-touchscreen">

Possible Duplicate:
Is it possible to let my c# wpf program know if the user has a touchscreen or not?

How can I tell if the device I'm working on has a touch screen? I'm thinking something like:

SystemParameters.IsPenWindows

解决方案

foreach (TabletDevice tabletDevice in Tablet.TabletDevices)
        {

            if(tabletDevice.Type == TabletDeviceType.Touch)
                return true;
        }

you can also refer this one: Is it possible to let my c# wpf program know if the user has a touchscreen or not?

这篇关于有没有一种方法来确定当前的屏幕支持触控?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆