如何清除Silverlight/Windows Phone 7中的导航历史记录? [英] How do I clear navigation history in Silverlight/Windows Phone 7?

查看:108
本文介绍了如何清除Silverlight/Windows Phone 7中的导航历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个具有登录/注销语义(对Web应用程序进行身份验证)的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.

地点"的概念-彼得·托尔的博客

如果您能够按照此指南进行操作,那将是最佳途径.对于处理登录屏幕有一些具体建议.

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 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆