swinefeaster
swinefeaster

Reputation: 2565

What event is triggered whenever the app is dragged back into the current window?

I'm struggling with the activation lifecycle for my app. I just want to save the state for the current page whenever the app is hidden or whenever the user navigates to a different page. Conversely, I want to restore the state whenever the user launches my app or navigates back to that page.

In the following case, I detect that the app was made hidden so I store the page's state, but I never get notified that the app was reactivated so I can restore the state:

(on surface)

  1. launch app
  2. press start
  3. drag app from left edge of screen and drop it back into focus

I was hoping the Resuming event would do it, but no. Which event should I use?

http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.application.resuming.aspx

Upvotes: 0

Views: 42

Answers (1)

w.b
w.b

Reputation: 11238

For the whole app, check Window.Activated, for individual pages you can use Page.OnNavigatedFrom / Page.OnNavigatedTo.

Upvotes: 1

Related Questions