void addElements()
 {
     _scroll.ContentSize = new CGSize(9 * (44 + 14), 44);
     for (int i = 0; i < 9; i++)
     {
         var img = new SingleRoundImageView(new CGRect(i * (44 + 14), 0, 44, 44));          //44+14 width+espacio
         _scroll.Add(img);
     }
 }
Beispiel #2
0
        private void initComment()
        {
            _image = new SingleRoundImageView(new CGRect(20, 12, 44, 44));
            //getimage (20, 12, 44, 44, "MLResources/default_img.png");
            Add(_image);

            string c = "";            //This  a sample comment for ml project, lets talk a litle bit";

            _name = getTextLabel(82, 12, 158, 16, "Alicia Smith", 12);
            Add(_name);
            _comment = getTextLabel(82, 28, 212, 28, c, 11);
            Add(_comment);
            _time = getTextLabel(248, 12, 50, 16, "1.25 pm", 11);
            Add(_time);
        }
        void addNewElements(int idx)
        {
            for (int i = idx; i < _usersList.Count; i++)
            {
                var img = new SingleRoundImageView(new CGRect(i * (44 + 14), 0, 44, 44));
                if (_usersList [i].userImage != null)
                {
                    img.ImageBytes = _usersList [i].userImage;
                }
                _usersList [i].PropertyChanged += (sender, e) => {
                    img.ImageBytes = (sender as MLearning.Core.ViewModels.MainViewModel.user_by_circle_wrapper).userImage;
                };
                _scroll.Add(img);
            }

            _scroll.ContentSize = new CGSize(_usersList.Count * (44 + 14), 44);
        }