c# - How to prevent PanoramaItem from swiping to the right in windows phone 8 xaml? -
i making tutorial page in xaml windows phone 8 app. tutorial build panoramaitems. problem users can swipe right , finish tutorial whitout following tutorial. want prevent this. got far:
private void firstitem_manipulationstarted(object sender, manipulationstartedeventargs e) { initialpoint = e.manipulationorigin; } private void firstitem_manipulationdelta(object sender, manipulationdeltaeventargs e) { point currentposition = e.manipulationorigin; if(currentposition.x > initialpoint.x) { // block swipe or set item } } i know they've swipet right, how can block this?
private void panorama_selectionchanged(object sender, selectionchangedeventargs e) { //set bool tutorial_not_finished = true once tutorial finished, false otherwise if (tutorial_not_finished && ((panorama)sender).selectedindex == 3) //or whatever page count have panoramacontrol.defaultitem = panoramacontrol.items[2]; //some else index last //or can use "panoramacontrol.defaultitem = item2" item2 name in appropriate panoramaitem in xaml } don't have visual studio available right can't test this, should close enough.
Comments
Post a Comment