public void ReloadUI(InboxRow row, UITableView tableView) { var item = row._item; _title.Text = item.TitleDecoded; _details.Text = item.BodyDecoded; _details2.Text = item.item_type.Replace("_", " ") + " " + BclEx.OffsetFromNow(item.creation_date); _title.Font = row.HeadingFont; _details.Font = row.DetailsFont; if (!string.IsNullOrEmpty(row.Details)) { _details.Text = row.Details; } float titleHeight = row.GetHeightTitle(tableView); float detailsHeight = row.GetHeightDetails(tableView); float leftOffset = row.HasImage ? 58 : 18; _details2.Frame = new RectangleF(leftOffset, 0, tableView.Frame.Width - leftOffset - 18, 20); _title.Frame = new RectangleF(leftOffset, 20, tableView.Frame.Width - leftOffset - 18, titleHeight); _details.Frame = new RectangleF(leftOffset, titleHeight + 20, tableView.Frame.Width - leftOffset - 18, detailsHeight); if (row.HasImage) { _image.Frame = new RectangleF(4, 4, 50, row.GetHeight(tableView) - 8); } //if (row.ImageGetter != null) // row.SetImage (this, row.ImageGetter()); }
public void ReloadUI(InboxRow row, UITableView tableView) { var item = row._item; _title.Text = item.TitleDecoded; _details.Text = item.BodyDecoded; _details2.Text = item.item_type.Replace("_", " ") + " " + BclEx.OffsetFromNow(item.creation_date); _title.Font = row.HeadingFont; _details.Font = row.DetailsFont; if (!string.IsNullOrEmpty(row.Details)) _details.Text = row.Details; float titleHeight = row.GetHeightTitle(tableView); float detailsHeight = row.GetHeightDetails(tableView); float leftOffset = row.HasImage ? 58 : 18; _details2.Frame = new RectangleF(leftOffset, 0, tableView.Frame.Width - leftOffset - 18, 20); _title.Frame = new RectangleF(leftOffset, 20, tableView.Frame.Width - leftOffset - 18, titleHeight); _details.Frame = new RectangleF(leftOffset, titleHeight + 20, tableView.Frame.Width - leftOffset - 18, detailsHeight); if (row.HasImage) _image.Frame = new RectangleF(4, 4, 50, row.GetHeight (tableView) - 8); //if (row.ImageGetter != null) // row.SetImage (this, row.ImageGetter()); }