当有人按后退键并进入 wp7 中的 xaml 站点时如何获取事件?
当用户在页面 A 并转到页面 B 时,我如何获取事件。在页面 B 上,他按后退并返回页面 A。 需要确定何时发生这种情况,我该如何使用 wp7 做到这一点?
how can i get the event when the user is on page A and go to page B. on page B he press back and returns tu page A.
need to determin when this happen, how could i do this with wp7?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
处理页面导航的 OnNavigedTo 事件(无论是通过 NavigationService 的 Navigate 还是 GoBack 方法)没有有关您从哪个页面导航的事件信息,也没有有关您如何导航的事件信息。
简而言之:这是不可能的。我也想不出有什么好的理由。
The OnNavigatedTo event that handles navigation to a page, be it by NavigationService's Navigate or GoBack method, have no event information on from which page you navigated from, and neither about how you navigated.
So in short: It's not possible. And I can't imagine any good reason for it either.
有 PhoneApplicationPage .OnBackKeyPress 完全可以完成您正在寻找的工作。
There is PhoneApplicationPage.OnBackKeyPress that does exactly the job you are looking for.