Hello, fellow developers. I have been wondering about the back-key navigation of a Windows Phone app and how it is supposed to work. I am aware that by pressing the back button my app is supposed to navigate to the previous page i.e the one the user 'came' from but there are a few different ways to implement this and I couldn't find any article on it. Unfortunately, I haven't paid attention to how other apps navigate.
So let's say I have three pages 1, 2, 3 and 4 with 1 being my startup page.
If the user navigates in the following order: 1 > 2 > 3 > 2 > 1 > 3 > 4 and then starts tapping the back key how should my app navigate?
Here are some of my guesses
4 > 3 > 1 > 2 > 3 > 2 > 1 > EXIT APP - This is an obvious solution but doesn't seem right
4 > 3 > 1 > EXIT APP - I simply go back until I'm at the startup page.
4 > 3 > 2 > 1 > EXIT APP This way, every time the user navigates to a page, I add the page to my 'History Stack' only if it isn't already in there. When on page 4, the stack will look like this: 1, 2, 3, 4. When pressing the back button, i will simply remove the page on top of the stack (the current page) and navigate to the one that goes on top next. If the stack is empty, I will terminate the app.
The third one feels right to me but are there any particular requirements or guidelines I should follow? Will my app get accepted with that 'algorithm' of navigation?
So let's say I have three pages 1, 2, 3 and 4 with 1 being my startup page.
If the user navigates in the following order: 1 > 2 > 3 > 2 > 1 > 3 > 4 and then starts tapping the back key how should my app navigate?
Here are some of my guesses
4 > 3 > 1 > 2 > 3 > 2 > 1 > EXIT APP - This is an obvious solution but doesn't seem right
4 > 3 > 1 > EXIT APP - I simply go back until I'm at the startup page.
4 > 3 > 2 > 1 > EXIT APP This way, every time the user navigates to a page, I add the page to my 'History Stack' only if it isn't already in there. When on page 4, the stack will look like this: 1, 2, 3, 4. When pressing the back button, i will simply remove the page on top of the stack (the current page) and navigate to the one that goes on top next. If the stack is empty, I will terminate the app.
The third one feels right to me but are there any particular requirements or guidelines I should follow? Will my app get accepted with that 'algorithm' of navigation?