| title | Application Class |
|---|
Provides static methods and properties to manage an application, such as methods to start and stop an application.
public static class Application | Exit () | Exits the application. |
| Run (Form) | Begins running a standard application message loop on the current thread, and makes the specified form visible. |
| Run (ICloseable) | Runs the application's main loop until the is closed. |
| RunOnUIThread (Action) | Performs the desired Action on the UI thread. |
| OnExit | Raised when the application is exiting. |
The most common use of this class is to start running a Modern.Forms application using a specified Form.
public static void Main (string[] args)
{
var form = new Form ();
form.Controls.Add (new Button ());
Application.Run (form);
}
This will display the Form to the user. When the Form is closed, the application
will automatically terminate.