Table of Contents

Event SessionEnded

Namespace
Terminal.Gui.App
Assembly
Terminal.Gui.dll

Raised when End(SessionToken) was called and the session is stopping. The event args contain a reference to the Toplevel that was active during the session. This can be used to ensure the Toplevel is disposed of properly.

[Obsolete("The legacy static Application object is going away.")]
public static event EventHandler<ToplevelEventArgs>? SessionEnded

Returns

EventHandler<ToplevelEventArgs>
Raised when was called and the session is stopping. The event args contain a reference to the that was active during the session. This can be used to ensure the Toplevel is disposed of properly.

Remarks

If StopAfterFirstIteration is true, callers to Begin(Toplevel) must also subscribe to SessionEnded and manually dispose of the SessionToken token when the application is done.