ShutdownRequested Event
Raised by the platform when an application shutdown is requested.
Definition
Namespace: Avalonia.Controls.ApplicationLifetimes
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
event EventHandler<ShutdownRequestedEventArgs> ShutdownRequested
Event ShutdownRequested As EventHandler(Of ShutdownRequestedEventArgs)
abstract ShutdownRequested : IEvent<EventHandler<ShutdownRequestedEventArgs>,
ShutdownRequestedEventArgs>
Value
EventHandler(ShutdownRequestedEventArgs)
Remarks
Application Shutdown can be requested for various reasons like OS shutdown. On Windows this will be called when an OS Session (logout or shutdown) terminates. Cancelling the eventargs will block OS shutdown. On OSX this has the same behavior as on Windows and in addition: This event is raised via the Quit menu or right-clicking on the application icon and selecting Quit. This event provides a first-chance to cancel application shutdown; if shutdown is not canceled at this point the application will try to close each non-owned open window, invoking the Closing event on each and allowing each window to cancel the shutdown of the application. Windows cannot however prevent OS shutdown.
See Also
Reference
IClassicDesktopStyleApplicationLifetime Interface
Avalonia.Controls.ApplicationLifetimes Namespace