WebUIApplication WebUIApplication WebUIApplication WebUIApplication WebUIApplication Class


Enables an app to receive notifications related to the lifetime of the app.

public : static class WebUIApplication
static struct winrt::Windows::UI::WebUI::WebUIApplication
public static class WebUIApplication
Public Shared Class WebUIApplication
// This class does not provide a public constructor.

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


The system creates this object when it runs the app.


: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX)


Version history

Windows version SDK version Value added
1607 14393 EnablePrelaunch
1607 14393 EnteredBackground
1607 14393 LeavingBackground
1709 16299 RequestRestartAsync
1709 16299 RequestRestartForUserAsync
1809 17763 BackgroundActivated
1809 17763 NewWebUIViewCreated


EnablePrelaunch(Boolean) EnablePrelaunch(Boolean) EnablePrelaunch(Boolean) EnablePrelaunch(Boolean) EnablePrelaunch(Boolean)

Specifies whether pre-launching is enabled.

RequestRestartAsync(String) RequestRestartAsync(String) RequestRestartAsync(String) RequestRestartAsync(String) RequestRestartAsync(String)

Attempts to programatically restart the application.

RequestRestartForUserAsync(User, String) RequestRestartForUserAsync(User, String) RequestRestartForUserAsync(User, String) RequestRestartForUserAsync(User, String) RequestRestartForUserAsync(User, String)

Requests that the system restarts the app in the context of a specific user.


Activated Activated Activated Activated Activated

Occurs when the app is activated.

BackgroundActivated BackgroundActivated BackgroundActivated BackgroundActivated BackgroundActivated

Invoked when the application is activated in the background.

EnteredBackground EnteredBackground EnteredBackground EnteredBackground EnteredBackground

Occurs when the app has begins running in the background (no UI is shown for the app).

LeavingBackground LeavingBackground LeavingBackground LeavingBackground LeavingBackground

Occurs when the app is about to leave the background and before the app's UI is shown.

Navigated Navigated Navigated Navigated Navigated

Occurs when the app is navigating.

NewWebUIViewCreated NewWebUIViewCreated NewWebUIViewCreated NewWebUIViewCreated NewWebUIViewCreated

Occurs when the system creates a new view for the app.

Resuming Resuming Resuming Resuming Resuming

Occurs when the app is resuming.

Suspending Suspending Suspending Suspending Suspending

Occurs when the app is suspending.

See also