Thursday, January 3, 2013

How to Detect a Touch Screen (C#)

Just a quick note to show you how to detect a touch screen. This code could be used to hide the application cursor if the application is running on a touch screen device.

I hope it helps.

private bool HasTouchInput()
return Tablet.TabletDevices.OfType<TabletDevice>().Any(t => t.Type == TabletDeviceType.Touch);

No comments:

Post a Comment