如何清除 Silverlight/Windows Phone 7 中的导航历史记录? [英] How do I clear navigation history in Silverlight/Windows Phone 7?
问题描述
我正在制作一个具有登录/注销语义的 Windows Phone 7 应用程序(对网络应用程序进行身份验证).当用户注销时,我导航回登录屏幕并忘记会话身份验证.
I'm making a Windows Phone 7 app that has login/logout semantics (authenticating to a web app). When the user logs out I navigate back to the login screen and forget the session authentication.
这样做时,我还想清除导航历史记录,这样就无法返回期望它们已经通过身份验证的页面.
When doing so I'd also like to clear the navigation history so that can't go back to a page that expects them to be already authenticated.
看不到如何使用 NavigationService
来做这件事,我想知道是否有办法做到这一点.
Can't see how to do it with NavigationService
and am wondering if there is a way to do this.
推荐答案
这里有几件事要看.首先,我建议您熟悉此处提供的指南.
There are a few things to look at here. First is I recommend familiarising with the guidance offered here.
重定向初始导航 - Peter Torr 的博客(抱歉,暂时关闭了)
如果您能够在此指导下工作,那是最佳途径.有处理登录屏幕的具体建议.
If you're able to work within this guidance that is the best path. There is specific advice for dealing with login screens.
如果您被迫提供主页按钮功能.请注意如何应用这一点,因为验证者会因为应用程序在导航方面的表现出乎意料而退缩.我觉得如果这个功能在主页按钮后面,你在惊喜部门应该没问题.随着时间的推移,我们将看到认证的情况.可以说是注销"场景同样适用.
If you are compelled to offer a home button feature. Be careful how you apply this, as certifiers are knocking apps back for behaving in unexpected ways with respect to navigation. I feel if this function is behind a home button you should be ok in the surprise department. How this stands over time with certification we will see. Arguably a "logout" scenario applies equally.
这里有来自 Richard Woo, Maarten Struys,山姆·贾拉万.
这篇关于如何清除 Silverlight/Windows Phone 7 中的导航历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!