在应用程序启动时根据条件显示 2 个不同的页面? [英] On application launch show 2 different pages based on a 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 main page once the user has entered their password once before.
我看到您可以在 WMAppManifest.xml(如下)中设置默认导航页面,我正在考虑创建自己的 PhoneApplicationFrame,但我不确定应该如何去做.
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>
感谢您的帮助
推荐答案
Peter Torr 在这里很好地介绍了页面重定向.提供了两种方法,并涵盖了相对优点.
Peter Torr covers page redirections quite well here. Two methods are offered with relative merits covered.
我还建议您熟悉他随附的有关地点的帖子.
I'd also recommend familiarising with his accompanying post on places here.
此地址返回堆栈处理(认证考虑)并解决登录页面等场景.
This address back stack handling (certification consideration) and addresses scenarios such as login pages.
这篇关于在应用程序启动时根据条件显示 2 个不同的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!