public Detail (MobileTask task) { InitializeComponent (); this.ViewModel = new DetailViewModel(this.Navigation); this.ViewModel.Task = task; this.BindingContext = this.ViewModel; }
private async Task UpdateIsCompleted(MobileTask task) { task.IsCompleted = !task.IsCompleted; this.IsBusy = true; await this.MobileService.UpsertTaskAsync(task); this.IsBusy = false; }
public async Task<MobileTask> UpsertTaskAsync(MobileTask task) { return await this.Client.InvokeApiAsync<MobileTask, MobileTask>("task", task); }