开发者

On application launch show 2 different pages based on a condition?

开发者 https://www.devze.com 2023-01-26 09:33 出处:网络
Does anyone know how to show two different \"first\" pages on application launch based on some condition.

Does anyone know how to show two different "first" pages on application launch based on some condition.

an example of this would be show a log in page when a user has not entered their password yet, but show the m开发者_JS百科ain page once the user has entered their password once before.

I see that you can set the default navigation page in WMAppManifest.xml (below), and I was looking into possibly creating my own PhoneApplicationFrame, but I am unsure how I should go about it.

<Tasks>
     <DefaultTask  Name ="_default" NavigationPage="MainPage.xaml"/>
</Tasks>

Thanks for the help


Peter Torr covers page redirections quite well here. Two methods are offered with relative merits covered.

Redirecting an initial navigation - Peter Torr's Blog

I'd also recommend familiarising with his accompanying post on places here.

Introducing the concept of “Places” - Peter Torr's Blog

This address back stack handling (certification consideration) and addresses scenarios such as login pages.


You can use a ChildWindow to show a modal window with the login form ?

http://wildermuth.com/2010/08/17/Using_ChildWindow_in_Windows_Phone_7_Projects

I used one for a first time run of my application to set preferences.


You could have your main page do nothing but check the condition and then forward the caller to the correct "start page" or you could build your main page in accordance with the condition. The former seems like the easiest solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号