Application.Resuming event

Applies to Windows and Windows Phone

Occurs when the application transitions from Suspended state to Running state.

Syntax


public:
event EventHandler<object>^ Resuming {
   Windows::Foundation::EventRegistrationToken add(EventHandler<object>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

DelegateSystem.EventHandler<Object> [.NET] | Windows.Foundation.EventHandler<Object> [C++]

Remarks

The system suspends your app whenever the user switches to another app or to the desktop, and resumes your app whenever the user switches back to it. However, the system can also terminate your app while it is suspended in order to free up resources. Therefore, you should handle the Suspending event to save your app state.

If your app is terminated, you can restore the app state in an OnLaunched method override. If your app resumes before it is terminated, the system restores the app state automatically. You should handle the Resuming event only if you need to refresh any displayed content that might have changed while the app is suspended, such as news feeds or the user's location.

Applications should avoid invoking code that puts a high load on the UI thread in response to Resuming. Doing so gives appearance to the user that the shell is being unresponsive, when in fact it is your application code that is the throttle point. Delegate operations to other threads if possible, or use a staged or virtualized approach for rebuilding views and UI whenever the application is resumed.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

Application
Suspending
OnActivated
Launching and resuming apps

 

 

Show:
© 2014 Microsoft