IActivatableLifetime Interface
Definition
An interface for ApplicationLifetimes where the application can be Activated and Deactivated.
public interface IActivatableLifetime
Methods
| Name | Description |
|---|---|
| TryEnterBackground | Tells the application that it should attempt to enter its background state. For example on OSX this would be [NSApp hide] |
| TryLeaveBackground | Tells the application that it should attempt to leave its background state. For example on OSX this would be [NSApp unhide] |
TryEnterBackground Method
Tells the application that it should attempt to enter its background state. For example on OSX this would be [NSApp hide]
public bool TryEnterBackground()
Returns
bool
true if it was possible and the platform supports this. false otherwise
TryLeaveBackground Method
Tells the application that it should attempt to leave its background state. For example on OSX this would be [NSApp unhide]
public bool TryLeaveBackground()
Returns
bool
true if it was possible and the platform supports this. false otherwise
Events
| Name | Description |
|---|---|
| Activated | An event that is raised when the application is Activated for various reasons as described by the Avalonia.Controls.ApplicationLifetimes.ActivationKind enumeration. |
| Deactivated | An event that is raised when the application is Deactivated for various reasons as described by the Avalonia.Controls.ApplicationLifetimes.ActivationKind enumeration. |
Activated Event
An event that is raised when the application is Activated for various reasons as described by the Avalonia.Controls.ApplicationLifetimes.ActivationKind enumeration.
public event EventHandler<Avalonia.Controls.ApplicationLifetimes.ActivatedEventArgs> Activated
Deactivated Event
An event that is raised when the application is Deactivated for various reasons as described by the Avalonia.Controls.ApplicationLifetimes.ActivationKind enumeration.
public event EventHandler<Avalonia.Controls.ApplicationLifetimes.ActivatedEventArgs> Deactivated