Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Navigation Stack within a 'Wizard' type structure

$
0
0

I am in the process of migrating an application from Xamarin Android to Xamarin Forms using the MVVM framework and have hit an issue. I have a Page which calls a wizard which may loop around multiple times before it exits. My logic is :-1:

mainPage --> WizardPage1 --> Wizard Page2 --> WizardPage3 --> WizardPage2 --> WizardPage3 --> etc

The idea is that the first page asks how many items are to be created and pages 2 and 3 allow an item to be created each time around. However once started I don't want the user to be able to just go back through the pages. At the end of the wizard (last call of page3) I want to be able to simply jump back to 'mainpage' skipping all of the pages in between.

In Android I used the 'NoHistory' option when displaying an Activity which did not put the page onto the navigation stack and hence worked as I wanted. I did try modal PushModalAsync in Xamarin Forms but it seems you can't call a modal page from another modal page.

My approach at this time to end the wizard is to loop through the navigation stack, checking the type of the page and popping it off the stack until I get back to MainPage but not sure if this is the best/correct way to do this.

I haven't found a solution to prevent the user from using the back button to go back through the wizard pages as yet...


Viewing all articles
Browse latest Browse all 204402


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>