Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preventing swiping between Pivot elements

I understand this question has been asked before, but never for Windows Phone 8 has it been answered.

In Windows Phone 7, it was possible to set isHitTestVisible = false on the base Pivot element to stop the PivotItem from scrolling when swiping over certain elements, like Sliders and TextBoxes. In Windows Phone 8, however, the Pivot beings scrolling before the ManipulationStarted event (or even the Touch object's events) fires. This means that one cannot prevent scrolling between Pivots by listening for ManipulationStarted on certain Controls like one could in Windows Phone 7.

Is there any way to disable scrolling over certain elements, or even certain sections of the screen?

like image 915
Eric Dand Avatar asked Jun 10 '13 21:06

Eric Dand


1 Answers

If your actual problem is that the Pivot swallow manipulation events for map/slider/etc. controls, try set UseOptimizedManipulationRouting="False".

MSDN have a longer explanation of this property.

Otherwise the correct approach is to use Pivot.IsLocked="True".

like image 124
Claus Jørgensen Avatar answered Oct 17 '22 01:10

Claus Jørgensen