问题
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;
}
}
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.
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)
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.
Thanks in advance.
回答1:
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/
It's not too complicated.
来源:https://stackoverflow.com/questions/6772588/wp7-tombstoning-and-querystring