Class MainViewModel
The app's current page: the sign-in form, resuming, or the chat screen; it owns the running connection.
Inherited Members
Namespace: Uniform.Chat.Avalonia.ViewModels
Assembly: Uniform.Chat.Avalonia.dll
Syntax
public sealed class MainViewModel : ViewModelBase, INotifyPropertyChanged, INotifyPropertyChanging
Constructors
| Edit this page View SourceMainViewModel(GuiPlatform, IUiDispatcher)
Create the app state for platform.
Declaration
public MainViewModel(GuiPlatform platform, IUiDispatcher ui)
Parameters
| Type | Name | Description |
|---|---|---|
| GuiPlatform | platform | |
| IUiDispatcher | ui |
Properties
| Edit this page View SourceLogin
The sign-in form, kept between attempts.
Declaration
public LoginViewModel Login { get; }
Property Value
| Type | Description |
|---|---|
| LoginViewModel |
Page
Declaration
[ObservableProperty]
[ExcludeFromCodeCoverage]
public ViewModelBase Page { get; set; }
Property Value
| Type | Description |
|---|---|
| ViewModelBase |
Settings
Appearance and notification settings, applied by the app.
Declaration
public SettingsViewModel Settings { get; }
Property Value
| Type | Description |
|---|---|
| SettingsViewModel |
Methods
| Edit this page View SourceStartAsync()
Resume the remembered account, or stay on the sign-in form.
Declaration
public Task StartAsync()
Returns
| Type | Description |
|---|---|
| Task |
StopAsync()
Stop the engine, e.g. when the app closes.
Declaration
public Task StopAsync()
Returns
| Type | Description |
|---|---|
| Task |