예제 #1
0
        async void Handle_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            if (e.Item == null)
            {
                return;
            }

            TaskViewModel model = e.Item as TaskViewModel;
            TaskPage      page  = new TaskPage(model);

            await Navigation.PushAsync(page);
        }
예제 #2
0
        async Task <int> AddTask()
        {
            TaskItem item = new TaskItem();
            await TaskManager.UpdateItem(item);

            TaskViewModel vm   = new TaskViewModel(item);
            TaskPage      page = new TaskPage(vm);

            model.AddNewItem(vm);

            await Navigation.PushAsync(page);

            return(0);
        }