There are certain elements of Win 8 Store App UI that change based on whether the user has a touch screen. For example, a ScrollViewer, when rendered on a non-touch screen shows a vertical scrollbar. On a touch screen, the scrollbar is hidden.
I would like to tailor my application UI, adding extra controls, for non-touch screen users. Does anyone know if it is possible to detect whether a user has a touch screen?
You can use the
Windows.Devices.Inputnamespace to detect various capabilities (touch, keyboard, mouse, etc.). For example, the TouchCapabilities class has aTouchPresentproperty you could check to see if there’s a digitizer available.Take a look at the Input: Device capabilities sample to see them in action.