C# Class System.Windows.Mvvm.Sample.ViewModels.MainViewModel

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

Public Methods

Method Description
MainViewModel ( NavigationService navigationService, TodoListItemsRepository todoListItemsRepository ) : System.Linq

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 method

Initializes a new MainViewModel instance.
public MainViewModel ( NavigationService navigationService, TodoListItemsRepository todoListItemsRepository ) : System.Linq
navigationService NavigationService
todoListItemsRepository System.Windows.Mvvm.Sample.Repositories.TodoListItemsRepository The todo list items repository, which can be used to manage the items on the todo list.
return System.Linq

OnActivateAsync() public method

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

OnNavigateToAsync() public method

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 System.Windows.Mvvm.Services.Navigation.NavigationEventArgs The navigation arguments, that contain more information about the navigation.
return System.Threading.Tasks.Task