WP7 墓碑和查询字符串 [英] WP7 Tombstoning and Querystring
问题描述
我正在运行非常基本的 xml 阅读器,我使用以下方法将一些数据传递到详细信息页面:
I am running very basic xml reader and I pass some data to the details page by using:
private void HaberlerListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (e.AddedItems.Count > 0)
{
NavigationService.Navigate(new Uri("/News.xaml", UriKind.Relative));
FrameworkElement root = Application.Current.RootVisual as FrameworkElement;
root.DataContext = (HaberItem)e.AddedItems[0];
((ListBox)sender).SelectedIndex = -1;
}
}
一个星期以来,我试图阅读并理解如何处理墓碑,但我失败了.我设法使用了 Tombstone Helper,但无法保存图像和网络浏览器内容.
For a week I am trying to read and understand how to deal with Tombstoning but I failed. I managed to use Tombstone Helper but i couldn't save images and webbrowser content.
在之前的问题中:WP7 - 从我分配的页面恢复一>.我听说我可以保存导航 url,所以当用户点击返回时 wp7 会像以前一样导航到相同的 url.(记录:我不使用 ViewModel)
In the earlier question: WP7 - Resume from the page I assigned . I heard that I can save the navigation url so when the user clicks back wp7 will navigate to the same url like before. (For the records:I don't use ViewModel)
我想了解您对如何保存此 url 的看法,以便我该死的 :) 应用程序可以进行墓碑删除,我可以休息一会儿 :D.
I would like to get your view on how to save this url so My damned :) application can tombstone and I can rest a while :D.
提前致谢.
推荐答案
当应用程序从其逻辑删除状态返回时,将恢复页面 URI,包括查询字符串.而不是使用 Tombstone Helper,我建议您了解墓碑的实际工作原理,请阅读这篇文章:
The page URI, including querystring, is restored when an application returns from its tombstoned state. Rather that using Tombstone Helper I would recommend that you learn how tombstoning actually works, have a read of this article:
http://www.scottlogic.co.uk/blog/colin/2011/05/a-simple-windows-phone-7-mvvm-tombstoning-example/
这不是太复杂.
这篇关于WP7 墓碑和查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!