Managing Session State with SuspensionManager

Session state is a set of app-specific data that captures things such as which item in a list is currently selected, which page of an article is being viewed, or the current scrollbar position. Unlike user data, such as an email message currently being composed inside your app, it’s usually okay if session data somehow gets lost. It provides great value for keeping the user in context across multiple physical executions of an app. But if the user accidentally closes an app by swiping downward instead of sideways on a tablet, it’s usually not worth making an effort to expose the option to restore it on next launch. (The biggest exception to this is probably the user’s session in a game. That tends ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.