Asked by:

Detect app bar swipe with pen/stylus

Question

With an app store WinJS/JavaScript app, is it possible to detect that the app bar was opened via a pen/stylus swipe instead of a touch swipe, Windows+Z keyboard, or right click mouse event? I'd like to present a different app bar menu if the gesture
came from a stylus.

Thx in advance,
Donavon

Saturday, May 18, 2013 1:32 AM

All replies

I think best you can do is to use the Page.PointerMoved event to differentiate the pointer type (touch or pen)... This of course does not help you with the mouse right click or win+Z. But there is no unified mechanism as to my knowledge to distinguish
what caused the app bar to open.

Page.PointerMoved appears to be a C#/XAML thing and not JavaScript. What I would like to see a property on the AppBar.onbeforeshow
eventInfo object, something like "eventAction", but I'm sure that is asking too much.

Tuesday, May 21, 2013 2:12 PM

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.