C# Class MvvmFramework.Samples.Uwp.ViewModels.MainViewModel

Represents the view model for the main view of the application.
Inheritance: Windows.Mvvm.Services.Navigation.ViewModel
Afficher le fichier Open project: lecode-official/mvvm-framework

Méthodes publiques

Méthode Description
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.

Method Details

MainViewModel() public méthode

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.
Résultat MvvmFramework.Samples.Uwp.Models

OnActivateAsync() public méthode

Is called when the view model is created. Initializes the commands of the view model.
public OnActivateAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

OnNavigateToAsync() public méthode

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.
Résultat System.Threading.Tasks.Task