Skip to main content

TryShutdown Method

Tries to Shutdown the application. ShutdownRequested event can be used to cancel the shutdown.

Definition

Namespace: Avalonia.Controls.ApplicationLifetimes
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)

bool TryShutdown(
int exitCode = 0
)
View Source

Parameters

  Int32  (Optional)
An integer exit code for an application. The default exit code is 0.

Return Value

Boolean

See Also

Reference

IClassicDesktopStyleApplicationLifetime Interface
Avalonia.Controls.ApplicationLifetimes Namespace