You are developing a Windows Store weather app.
You need to restore the state of the app while the app is being reactivated.
Which code segments should you use? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be
used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Explanation:
Note:
* When a user selects your app to share content, Windows activates your app. Because there are many ways that Windows could activate your app, you need to
add code to your activated event handler that detects why the activation occurred. You do this by checking the value of the kind property.
JavaScript
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
// The application has been launched. Initialize as appropriate.
if (app.sessionState) {
// restore previous state from sessionState
}onactivated event (Windows)
ActivationKind enumeration (Windows)
WinJS.Application.sessionState object (Windows)