/// <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();
 }
Example #2
0
        private async Task CarrotsCommandExecute()
        {
            await DoSomethingSilly();

            await _pageService.PushPageAsync <CarrotsPage, CarrotsPageVm>((vm) => vm.SetState(null));
        }
Example #3
0
 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 */ });
 }