Answered by:
MSPointer (MSGesture) in scrollable elements

Question
-
Hi,
I've been stuck on this for the past few days: I need to capture MSPointerDown events on an element which is scrollable (overlay: auto). When I try to capture the event, I keep getting just a single MSPointerDown for the first touch, any other touches are ignored. This happens when I try to capture events both on an element and on the whole document or window, I always get just the first touch.
I have also tried setting -ms-touch-action in CSS to none, this led to all touches firing their individual events properly, but now I don't get the nice scrolling behaviour built in to Windows (bounce on scroll end, scroll rails, etc.).
Generally, my situation is this: I need scrolling in one direction for scrolling the contents of an item, scrolling in another direction for flipping between individual items (using FlipView) and on top of it all I need to capture gestures of rotation and scale (pinch zoom).
Overall, I see following possible solutions, none of which I know how to accomplish :)
- Find a way to force Windows to pass (bubble) MSPointerDown events when they are called on scrollable items, having -ms-touch-action set to auto
- Set -ms-touch-action to none, then pass captured MSPointers to the scrollable elements so they would scroll (SetPointer does not seem work for this)
- Find a way to get all current Pointers in the app, akin to the deprecated GetPointerList
- Worst case, with -ms-touch-action on none, program all the nice scrolling features Windows has on my own (slow both to code and possibly to execute as well)
Any ideas from local folks?
- Edited by veproza Tuesday, June 26, 2012 1:25 PM typo :)
Tuesday, June 26, 2012 1:25 PM
Answers
-
hum...I suggested the app bar as away to set up the -ms-touch-action with the least amount of code...
Luis Abreu
- Marked as answer by Dino He Monday, July 9, 2012 10:28 AM
Thursday, June 28, 2012 8:30 AM
All replies
-
Why don't you transform those actions into app bar commands? picking a command would change the value of the -ms-touch-action...wouldn't that simplify your app?
Luis Abreu
Wednesday, June 27, 2012 11:18 AM -
Throwing away gestures and going with appbar commands is more of a work-around than a solution, but certainly a possibility if all else fails. I just feel the gestures are somewhat more intuitive at what I want to do than swiping for and appbar and picking a button.
Switching the whole -ms-touch-action property would be no use as the gestures are part of the navigation as well so it would break the UX.
Wednesday, June 27, 2012 3:43 PM -
hum...I suggested the app bar as away to set up the -ms-touch-action with the least amount of code...
Luis Abreu
- Marked as answer by Dino He Monday, July 9, 2012 10:28 AM
Thursday, June 28, 2012 8:30 AM -
Did you ever figure this out? I'm facing exactly the same problem.Thursday, July 19, 2012 11:23 AM
-
Nope, would've posted a solution if I have. I reverted to the Appbar for those comments for now, if I ever happen to find how to make it work I'll surely post it here.Wednesday, July 25, 2012 11:32 AM
-
I am dealing with the same issue for a couple of days. Please post the solution if you get one.
Saturday, November 24, 2012 6:38 PM