Class App
A base class to implement an App instance using UI Toolkit.
Inherited Members
Namespace: Unity.AppUI.MVVM
Assembly: solution.dll
Syntax
public class App : IUIToolkitApp, IApp, IDisposable
Properties
current
The current App instance.
Declaration
public static App current { get; }
Property Value
Type | Description |
---|---|
App |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when the current App instance is not available. |
hosts
The hosts of the application.
Declaration
public IEnumerable<IUIToolkitHost> hosts { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IUIToolkitHost> |
mainPage
The main page of the application.
Declaration
public VisualElement mainPage { get; set; }
Property Value
Type | Description |
---|---|
VisualElement |
Methods
Dispose()
Disposes the current App instance.
Declaration
public void Dispose()
Dispose(bool)
Disposes the current App instance.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | True to dispose managed resources. |
~App()
Destructor.
Declaration
protected ~App()
Initialize(IServiceProvider, IHost)
Initializes the current App instance.
Declaration
public void Initialize(IServiceProvider serviceProvider, IHost host)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | The service provider to use. |
IHost | host | The host to use. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when a current App instance already exists. |
ArgumentNullException | Thrown when one or more required arguments are null. |
Shutdown()
Called to shutdown the application.
Declaration
public virtual void Shutdown()
Events
shuttingDown
Event called when the application is shutting down.
Declaration
public static event Action shuttingDown
Event Type
Type | Description |
---|---|
Action |