Skip to main content

IControlledApplicationLifetime Interface

Definition

Assembly:Avalonia.Controls
Package:Avalonia
public interface IControlledApplicationLifetime

Methods

NameDescription
ShutdownShuts down the application and sets the exit code that is returned to the operating system when the application exits.

Shutdown Method

Shuts down the application and sets the exit code that is returned to the operating system when the application exits.

public void Shutdown(int exitCode)

Parameters

exitCode int

An integer exit code for an application. The default exit code is 0.

Events

NameDescription
ExitSent when the application is exiting.
StartupSent when the application is starting up.

Exit Event

Sent when the application is exiting.

public event EventHandler<Avalonia.Controls.ApplicationLifetimes.ControlledApplicationLifetimeExitEventArgs> Exit

Startup Event

Sent when the application is starting up.

public event EventHandler<Avalonia.Controls.ApplicationLifetimes.ControlledApplicationLifetimeStartupEventArgs> Startup