Question

Since GestureListener is deprecated, we are now left with three events namely ManipulationStarted, ManipulationDelta, ManipulationCompleted.

My custom listbox enables, swiping left and right on listbox items to do certain functions. How do I use the manipulation events to detect long press on a listboxitem? I want to implement the long press in such a way that the swipe left and right is not broken.

Any clue/idea would be of great help!

Was it helpful?

Solution

Windows Phone 8 includes a Hold event. Can you sue that for detecting the long press?

If not, you'll need to use a timer within your manipulation events to determine the length of time between starting a manipulation and whether the point of manipulation moves (triggering a delta event) and so suggesting a swipe gesture OR if a delta or completed event is not fired within your defined amount of time then you can assume a long press.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top