private void addComments() { _scroll.ContentSize = new SizeF(320, 68 * 5); for (int i = 0; i < 5; i++) { MLSingleComment com = new MLSingleComment(new CGRect(0, i * 68, 320, 68)); _scroll.Add(com); } }
void addMoreComments(int idx) { if (_postsList != null) { for (int i = idx; i < _postsList.Count; i++) { MLSingleComment com = new MLSingleComment(new CGRect(0, i * 68, 320, 68)); com.CommentText = _postsList [i].post.text; com.NameText = _postsList [i].post.name + " " + _postsList [i].post.lastname; com.TimeText = _postsList [i].post.created_at.ToString(); if (_postsList [i].userImage != null) { com.ImageBytes = _postsList [i].userImage; } _postsList [i].PropertyChanged += (sender, e) => { com.ImageBytes = (sender as MLearning.Core.ViewModels.MainViewModel.post_with_username_wrapper).userImage; }; _scroll.Add(com); } } //resize scroll _scroll.ContentSize = new SizeF(320, 68 * _postsList.Count); }