3

Below code works fine on Windows 7 but not on Windows Embedded Standard 7 :

[System.Runtime.InteropServices.DllImport("user32.dll")]
    public static extern int GetSystemMetrics(int nIndex);

    public static bool isTouchEnabled()
    {
        int MAXTOUCHES_INDEX = 0x95;
        int maxTouches = GetSystemMetrics(MAXTOUCHES_INDEX);

        return maxTouches > 0;
    }
pankaj
  • 31
  • 5

1 Answers1

1

You can try this:

var hasTouch = Windows.Devices.Input
              .PointerDevice.GetPointerDevices()
              .Any(p => p.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Touch);

For more check this reference

Community
  • 1
  • 1
Suvro
  • 352
  • 2
  • 13
  • for Windows.Devices.Input.PointerDevice.GetPointerDevices() Minimum supported client is Windows 8 [link](https://msdn.microsoft.com/library/windows/apps/br225637) – pankaj Dec 30 '15 at 05:51