public async override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath) { var calEvent = viewModel.Events[indexPath.Row]; await viewModel.DeleteEvent(calEvent); tableView.ReloadData(); }
async void ListViewItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e) { MessageDialogs.SendConfirmation("Are you sure you want to delete this event?", "Confirmation", async(delete) => { if (!delete) { return; } await viewModel.DeleteEvent(viewModel.Events[e.Position]); Activity.RunOnUiThread(() => { ((BaseAdapter)listView.Adapter).NotifyDataSetChanged(); }); }); }