public override void ViewDidLoad() { base.ViewDidLoad(); Vm.Init(); AddButton = new UIBarButtonItem(UIBarButtonSystemItem.Add); NavigationItem.SetRightBarButtonItem(AddButton, false); AddButton.Clicked += (sender, args) => { }; // bindings AddButton.SetCommand("Clicked", Vm.AddPersonCommand); _currentIndexBinding = this.SetBinding( () => CurrentIndex, () => Vm.CurrentIndex); source = Vm.People.GetTableViewSource( CreateTaskCell, BindTaskCell, factory: () => new PeopleListObservableTableSource()); PeopleTableView.Source = source; PeopleTableView.Delegate = this; PeopleTableView.RowHeight = 185; PeopleTableView.ReloadData(); // Add Important Message View var importantMessage = ImportantMessageView.Create(); var importantMessageFrame = new CGRect(0, 0, View.Frame.Width, 50); importantMessage.Frame = importantMessageFrame; View.AddSubview(importantMessage); }
private UITableViewCell CreateTaskCell(NSString cellIdentifier) { var cell = PeopleTableView.DequeueReusableCell("PersonCellIdentifier") as PersonTableViewCell; if (cell == null) { cell = new PersonTableViewCell((NSString)"PersonCellIdentifier"); } return(cell); }
public override void ViewDidLoad() { base.ViewDidLoad(); Title = "People#"; var source = new MvxSimpleTableViewSource(this.PeopleTableView, PeopleRow.Key, PeopleRow.Key); this.AddBindings(new Dictionary <object, string> { { source, "ItemsSource Contacts" } }); PeopleTableView.RowHeight = 80; PeopleTableView.Source = source; PeopleTableView.ReloadData(); }
void ReleaseDesignerOutlets() { if (AddPersonButton != null) { AddPersonButton.Dispose(); AddPersonButton = null; } if (PeopleTableView != null) { PeopleTableView.Dispose(); PeopleTableView = null; } if (RemovePersonButton != null) { RemovePersonButton.Dispose(); RemovePersonButton = null; } }
void ReleaseDesignerOutlets() { if (PeopleTableView != null) { PeopleTableView.Dispose(); PeopleTableView = null; } if (Prova != null) { Prova.Dispose(); Prova = null; } if (RefreshButton != null) { RefreshButton.Dispose(); RefreshButton = null; } }