private void CreateUsersTableView(UsersTableSource usersTableSource) { // Create and display table view var table = new UITableView(GetFrameWithVerticalMargin(20)) { Source = usersTableSource }; Add(table); }
private async Task AddUsersTable() { var usersTableSource = new UsersTableSource() { ParentViewController = this, UsersRepository = await UsersRepository.GetInstance() }; usersTable = new UITableView(GetFrameWithVerticalMargin(20)) { Source = usersTableSource }; Add(usersTable); }
/// <summary> /// Configures the views for the settings screen. /// </summary> void InitializeViews() { View.BackgroundColor = AppColors.WHITE.ToUIColor(); UsersTable = new UITableView { RowHeight = 70f, SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine, TranslatesAutoresizingMaskIntoConstraints = false, }; TableSource = new UsersTableSource(VM.Users, UsersTable); UsersTable.Source = TableSource; // Add the subviews to the content view. View.AddSubviews(UsersTable); SetupMvxBindings(); UsersTable.ReloadData(); }