public override void ViewDidLoad() { _tableViewSource = new BestsellersTableViewSource(MyTableView); base.ViewDidLoad(); MyTableView.Source = _tableViewSource; MyTableView.ReloadData(); MvxFluentBindingDescriptionSet <SearchBooksTableView, SearchBooksTableViewModel> set = this.CreateBindingSet <SearchBooksTableView, SearchBooksTableViewModel>(); set.Bind(txtSearch) .To(vm => vm.SearchValue); set.Bind(_tableViewSource) .To(vm => vm.SearchResult); set.Bind(_tableViewSource) .For(src => src.SelectionChangedCommand) .To(vm => vm.ParentViewModel.NavigateToDetailCommand); set.Bind(btnSearch) .To(vm => vm.SearchBooksCommand); set.Bind(btnLoadMore) .To(vm => vm.LoadMoreCommand); set.Bind(btnLoadMore) .For(v => v.Enabled) .To(vm => vm.HasTwentyResults); set.Apply(); }
public override void ViewDidLoad() { base.ViewDidLoad(); Title = "Grouped Table View"; var myTableViewSource = new CustomTableViewSource(MyTableView); MyTableView.Source = myTableViewSource; var set = this.CreateBindingSet <MainView, MainViewModel>(); set.Bind(myTableViewSource).To(vm => vm.MyData); set.Apply(); MyTableView.ReloadData(); }