Loading a separate page for this navigation instance
i have just had an app denied in the windows phone market place because i didn't adhere to the "close application on back button" rule.
currently i am doing the following:
open app
if you've never entered your details, navigate to the save details page
on arriving at this "first entry" page i cancel the use of the back button
because as you can see the first view that the user sees is my "first entry" page although i'm trying to be smart and lock the user from going back to an empty main page (because they havent entered their details) i'm really stopping them from exiting on the first screen.
as there is no way to exit using code in silverlight as per
http://blogs.msdn.com/b/ptorr/archive/2010/08/01/exiting-a-windows-phone-application.aspx
what am i supposed to do?
should i let the user navigate back and then try and capture that they have just hit back and navi开发者_高级运维gate back again? (this seems like and odd way of doing it)
or is there a way for me to capture the first navigation instance and simply not store the first page actually loading into the history, so that when they hit back, it exits anyway?
I'm going to assume you mean "close app on back button rule"
I think the approach that will work for you and stick within cert reqs is to redirect the intial navigation... this will cause your initial page to not enter the backstack. Peter offers two implementations for this here.
Redirecting an initial navigation - Peter Torr's Blog
精彩评论