问题
How to swipe images through button click event just like windows phone Gallery Photo(left to right or vice verse,use 2 button "<" and ">").I have use pivot control to swipe images one by one & list box to collect all images.It is working fine for swipe(touch) gesture.
回答1:
you can easily achieve this via setting the Pivot.SelectedIndex
like
for forward
if(Pivot.selectedIndex < Pivot.Items.Count)
Pivot.selectedIndex++;
else
Pivot.selectedIndex = 0;
for backward
if(Pivot.selectedIndex > 0)
Pivot.selectedIndex--;
else
Pivot.selectedIndex = Pivot.Items.Count - 1;
来源:https://stackoverflow.com/questions/20297302/how-to-handle-pivot-swipe-gesture-through-button-click-event-in-windows-phone