Skip to main content

Run(Application, ICloseable) Method

On desktop-style platforms runs the application's main loop until closable is closed

Definition​

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

public static void Run(
this Application app,
ICloseable closable
)

Parameters​

  Application
 
  ICloseable
 

Usage Note​

In Visual Basic and C#, you can call this method as an instance method on any object of type Application. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks​

Consider using StartWithDesktopStyleLifetime instead, see https://github.com/AvaloniaUI/Avalonia/wiki/Application-lifetimes for details

See Also​

Reference​

DesktopApplicationExtensions Class
Run Overload
Avalonia.Controls Namespace