C# Класс MvvmFramework.Samples.Uwp.ViewModels.MainViewModel

Represents the view model for the main view of the application.
Наследование: Windows.Mvvm.Services.Navigation.ViewModel
Показать файл Открыть проект

Открытые методы

Метод Описание
MainViewModel ( NavigationService navigationService, ApplicationService applicationService, TodoListItemsRepository todoListItemsRepository ) : MvvmFramework.Samples.Uwp.Models

Initializes a new MainViewModel instance.

OnActivateAsync ( ) : System.Threading.Tasks.Task

Is called when the view model is created. Initializes the commands of the view model.

OnNavigateToAsync ( NavigationEventArgs e ) : System.Threading.Tasks.Task

Is called when the user is navigated to the view of this view model. Loads the todo list items from storage.

Описание методов

MainViewModel() публичный Метод

Initializes a new MainViewModel instance.
public MainViewModel ( NavigationService navigationService, ApplicationService applicationService, TodoListItemsRepository todoListItemsRepository ) : MvvmFramework.Samples.Uwp.Models
navigationService NavigationService The navigation service, which is used to navigate between views.
applicationService Windows.Mvvm.Services.Application.ApplicationService The application service, which can be used to manage the application lifecycle.
todoListItemsRepository MvvmFramework.Samples.Uwp.Repositories.TodoListItemsRepository The todo list items repository, which can be used to manage the items on the todo list.
Результат MvvmFramework.Samples.Uwp.Models

OnActivateAsync() публичный Метод

Is called when the view model is created. Initializes the commands of the view model.
public OnActivateAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

OnNavigateToAsync() публичный Метод

Is called when the user is navigated to the view of this view model. Loads the todo list items from storage.
public OnNavigateToAsync ( NavigationEventArgs e ) : System.Threading.Tasks.Task
e Windows.Mvvm.Services.Navigation.NavigationEventArgs The navigation arguments, that contain more information about the navigation.
Результат System.Threading.Tasks.Task