コード例 #1
0
            public async override void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath)
            {
                var calEvent = viewModel.Events[indexPath.Row];
                await viewModel.DeleteEvent(calEvent);

                tableView.ReloadData();
            }
コード例 #2
0
        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(); });
            });
        }