1
votes

Now I'm developing windows phone 8.1 app with WinRT

I'm trying to support swipe-right-to-go-back gesture in my app.

I try to capture the manipulation events on my page. My page's root is a grid and have a ListView inside. I used the UIElement.AddHandler method with "handledEventsToo=true" to add the event handlers. But when I touch the screen, only the ManipulationStarting event is fired, other events seems to be eat by listview.

Could anyone tell me about the manipulation event behavior or other methods to implement this feature? Thanks!!

2

2 Answers

0
votes

You won't normally capture events on LisView, beacause it has a ScrollViewer which intercepts them.

There is a way to do it - you will have to disable ScrollViewer and then perfrom some actions when the events are fired and perform scrolling manually. This answer will guide you.

0
votes

In case someone encounters this page, I spent the better part of a week figuring out why manipulation events were only firing half the time on my UWP charts using the winRT xaml toolkit.

You may need to check that the background is not null on whatever element has the event handler attached. Templated controls are not necessarily hit test visible unless they have one. Otherwise, the input can go right through to the element behind it. https://msdn.microsoft.com/en-us/windows/uwp/xaml-platform/events-and-routed-events-overview