public ContactForm() { dataForm = new SfDataForm(); dataForm.LayoutManager = new DataFormLayoutManagerExt(dataForm); tableView = new UITableView(); tableView.RowHeight = 50; tableView.SeparatorColor = UIColor.Clear; dataFormController = new DataFormController(dataForm, tableView); tableView.Source = new ContactTableSource(dataFormController, new ListViewGroupingViewModel().ContactsInfo); this.AddSubview(tableView); button = new UIButton(); uIView = new UIView(); uIView.AddSubview(button); uIView.BackgroundColor = UIColor.FromRGB(242.0f / 255.0f, 242.0f / 255.0f, 242.0f / 255.0f); button.SetTitle("Add", UIControlState.Normal); button.SetTitleColor(this.TintColor, UIControlState.Normal); button.TouchDown += Button_TouchDown; this.AddSubview(this.tableView); this.AddSubview(uIView); }
public ContactTableSource(DataFormController controller, ObservableCollection <ContactInfo> items) { TableItems = items; dataFormController = controller; }