DispatcherShutdownMode Enum

Definition

Defines constants that specify how an application will shut down.

public enum class DispatcherShutdownMode
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 393216)]
enum class DispatcherShutdownMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 393216)]
public enum DispatcherShutdownMode
Public Enum DispatcherShutdownMode
Inheritance
DispatcherShutdownMode
Attributes

Fields

OnExplicitShutdown 1

When the last XAML Window object on the thread is closed, the XAML runtime will not take any action to stop the event loop or message pump. (The XAML runtime does not call PostQuitMessage.)

OnLastWindowClose 0

When the last XAML Window object on the thread is closed, the DispatcherQueue.RunEventLoop call or message pump on the thread will exit. (The XAML runtime calls PostQuitMessage.)

Remarks

This enum provides values for the Application.DispatcherShutdownMode property.

Applies to

See also