tombstoning

When to save the state of the application for tombstoning?

最后都变了- 提交于 2019-12-01 20:49:14
I was wondering when is more appropriate to save the view model of the single pages. I see two possibilities: Save the state of each page (it's viewmodel) everytime you navagitefrom it so that it is already saved if the application happens to be terminated and reactivated during the tombstoning process In the application deactivated event, go through all the pages that are in the navigation stack and save their state (their viewmodel) and then re-inject it in the application activated event. Which is the correct way of handling it? Thx Simone Unfortunately the "best" time to save the state

Restore Scroll Position in LongListSelector after tombstone

拟墨画扇 提交于 2019-11-30 21:06:55
I'm trying to work with the LongListSelector control from the WP7 Silverlight Toolkit. It's taken a bit of work, but I finally have it working with my app. Unfortunately, I am having some trouble properly handling the tombstoning process. When the application tombstones (or the user navigates to another page by selecting an item in the list), I save a copy of the topmost visible item in the list. I save it to both a class variable and to the app state collection. ICollection<object> visibleItems = myLongList.GetItemsInView(); _lastItem = null; if (visibleItems.Count > 0) _lastItem =

Restore Scroll Position in LongListSelector after tombstone

…衆ロ難τιáo~ 提交于 2019-11-30 05:28:29
问题 I'm trying to work with the LongListSelector control from the WP7 Silverlight Toolkit. It's taken a bit of work, but I finally have it working with my app. Unfortunately, I am having some trouble properly handling the tombstoning process. When the application tombstones (or the user navigates to another page by selecting an item in the list), I save a copy of the topmost visible item in the list. I save it to both a class variable and to the app state collection. ICollection<object>