/// <summary> /// A very basic ViewModel /// </summary> public OnionsPageVm(IPageServiceZero pageService) { NextCommand = new CommandBuilder() .SetExecuteAsync(() => pageService.PushPageAsync <ResultsPage, ResultsPageVm>((vm) => vm.Init("Hello from the Onions Page!"))) .SetName("Next") .Build(); }
private async Task CarrotsCommandExecute() { await DoSomethingSilly(); await _pageService.PushPageAsync <CarrotsPage, CarrotsPageVm>((vm) => vm.SetState(null)); }
private async Task CabbagesPageCommandExecuteAsync(/* Optional : object arg */) { // Take us to the CabbagesPage page ... await _pageService.PushPageAsync <CabbagesPage, CabbagesPageVm>((vm) => { /* Initialize the vm in here if necessary */ }); }