Exemplo n.º 1
0
 /// <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();
 }
Exemplo n.º 2
0
        private async Task CarrotsCommandExecute()
        {
            await DoSomethingSilly();

            await _pageService.PushPageAsync <CarrotsPage, CarrotsPageVm>((vm) => vm.SetState(null));
        }
Exemplo n.º 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 */ });
 }