When building out a Windows Phone 7 application which utilizes the Pivot (or Panorama) controls there may be times where you want to disable the flick gesture which is used to swipe/move between the various Pivots.
My direct reasoning for wanting to do this was that I have a popup control which I opened in order to allow for some quick and simple data entry. However when this popup control is open the user could still use the swipe gesture and move between pivots. In order to prevent the user from being able to flick and move I went on the hunt on how to disable the gesture.
While doing my research on this I stumbled across this post which pointed me in the right direction. This post goes in to deeper details on the why and the how, but what is important is HOW you can disable the gesture.
To disable the flick gesture:
Set IsHitTestVisible = false on the root pivot control which you wish to stop the gestures. To re-enable the gesture simply set the value back to true.
Hope this helps.
Till next time,
Posted
11-07-2010 7:38 AM
by
Derik Whittaker