public override nfloat GetHeightForRow(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            MapListRowSource data = Items[indexPath.Row];

            if (data.IsHeader)
            {
                return(headerHeight);
            }
            return(RowHeight);
        }
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            MapListRowSource data = Items[indexPath.Row];

            MapListCell cell = (MapListCell)tableView.DequeueReusableCell(identifier);

            if (cell == null)
            {
                cell = new MapListCell();
            }

            cell.Update(data, indexPath.Row);

            return(cell);
        }
        public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            MapListRowSource item = Items[indexPath.Row];

            if (item.IsHeader)
            {
                return;
            }

            UIViewController controller = item.Controller;

            if (MapSelected != null)
            {
                MapSelected(new object(), new ControllerEventArgs {
                    Controller = controller
                });
            }
        }
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            MapListRowSource data = Items[indexPath.Row];

            BaseCell cell = (BaseCell)tableView.DequeueReusableCell(identifier);

            if (cell == null)
            {
                if (data.IsHeader)
                {
                    cell = new MapListHeaderCell();
                }
                else
                {
                    cell = new MapListCell();
                }
            }

            cell.Update(data);

            return(cell);
        }
        public GalleryRow(MapListRowSource source)
        {
            Source = source;

            BackgroundColor = Colors.CartoRed;

            image = new UIImageView();

            if (source.ImageResource != null)
            {
                image.Image         = UIImage.FromFile(source.ImageResource);
                image.ContentMode   = UIViewContentMode.ScaleAspectFill;
                image.ClipsToBounds = true;
            }

            label               = new UILabel();
            label.Text          = source.Title.ToUpper();
            label.Font          = UIFont.FromName("HelveticaNeue", 10);
            label.TextColor     = UIColor.White;
            label.TextAlignment = UITextAlignment.Center;

            AddSubviews(image, label);
        }
Beispiel #6
0
 public override void Update(MapListRowSource item)
 {
     base.Update(item);
     description.Text = item.Description;
 }
 public void Update(MapListRowSource item, int position)
 {
     title.Text       = (position + 1) + ". " + item.Title;
     description.Text = item.Description;
 }
Beispiel #8
0
 public virtual void Update(MapListRowSource item)
 {
     title.Text = item.Title;
 }