开发者

WP7 Tombstoning and Querystring

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 U开发者_运维问答ri("/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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜