public ReminderTableDataSource(ReminderListViewModel viewModel) { this.ViewModel = viewModel; Action action = () => { //change the button //save the completed }; CompletedTapGestureRecognizer = new UITapGestureRecognizer(action); }
public override void ViewDidLoad() { base.ViewDidLoad(); if (ViewModel == null) { ViewModel = new ReminderListViewModel(); } // Setup UITableView. refreshControl = new UIRefreshControl(); refreshControl.ValueChanged += RefreshControl_ValueChanged; TableView.Add(refreshControl); TableView.Source = new ReminderTableDataSource(ViewModel); Title = ViewModel.Title; ViewModel.PropertyChanged += IsBusy_PropertyChanged; ViewModel.Reminders.CollectionChanged += Items_CollectionChanged; }