如何检索我们返回的页面的 Uri
我有一个应用程序,可以根据我按下的按钮触发多个页面。
返回主页面时,有没有办法判断是来自哪个页面?
我查看了 onNavigedTo、onNavigatingFrom 或 onNavigedFrom,当从页面返回时,仅调用 onNavigedTo。
我的目标是 WP7 7.0,我看到 7.1 中现在有一个 BackStack 属性,但在 7.0 中不可用。
我发现了解如此重要的信息是多么困难,在一天结束时,我所寻找的就是能够将参数从页面传递回原始调用者
(我确实阅读了 如何访问上一页的URI在 Windows Phone 中7,但该答案不适合使用 7.0)
I have an application that can fire several pages depending on the button I press.
When returning to the main page, is there a way to determine which page it is coming from?
I looked into onNavigatedTo, onNavigatingFrom or onNavigatedFrom, when coming back from a page, only onNavigatedTo is called.
I'm targeting WP7 7.0, I see that in 7.1 there's now a BackStack property but it isn't available in 7.0.
I find it quite amazing on how difficult it is to know such important information, at the end of the day, all I'm looking for is being able to pass parameters back from a page to the original caller
(I did read How to access the URI of the previous page in Windows Phone 7, but that answer isn't suitable using 7.0)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也需要这样做,但我不认为这是“开箱即用”的。您可能必须编写自己的方法。您可以将当前页面保存到独立存储中,并在每次离开页面时更新它。
I have need to do this as well but I don't think this is provided 'out of the box'. You might have to write you own way of doing it. You could save the current page into isolated storage and update it each time you leave a page.
您可以尝试将页面作为查询字符串发送,例如:
you could try to send the page as a querystring, for example: