Amr H. Abd Elmajeed
Amr H. Abd Elmajeed

Reputation: 1521

How to determine pivot flick is right or left?

Which event is used to determine if the user flicked the pivot right or left?

Upvotes: 3

Views: 1207

Answers (1)

Derek Lakin
Derek Lakin

Reputation: 16319

The Pivot control uses the angle reported in the FlickEventArgs of the Flick event to determine which way to navigate the items. An angle of 180 degrees means a navigation to the right, an angle of 0 degrees means a navigation to the left.

If you want to detect this in your own code you could use the GestureService from the Silverlight Windows Phone Toolkit as described in this article or you could simply keep track of the SelectedIndex property on the Pivot control to determine which way the user flicked.

I'd be interested to know to what purpose you're going to put this knowledge :)

Upvotes: 4

Related Questions