public void UpdateCell (SpeakerListItemViewModel speaker) { nameLabel.Text = speaker.Name; string subtitle = ""; if (String.IsNullOrEmpty (speaker.Title)) subtitle = String.Format ("{0}", speaker.Company); else if (String.IsNullOrEmpty(speaker.Company)) subtitle = String.Format("{0}", speaker.Title); else subtitle = String.Format ("{0}, {1}", speaker.Title, speaker.Company); companyLabel.Text = subtitle; if (speaker.ImageUrl != "http://www.mobileworldcongress.com") { var u = new Uri(speaker.ImageUrl); image.Image = ImageLoader.DefaultRequestImage(u,this); } }
public SpeakerCell (UITableViewCellStyle style, NSString ident, SpeakerListItemViewModel showSpeaker) : base (style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; nameLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; companyLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; image = new UIImageView(); UpdateCell (showSpeaker); ContentView.Add (nameLabel); ContentView.Add (companyLabel); ContentView.Add (image); }
public SpeakerElement(SpeakerListItemViewModel speaker) : base(speaker.Name) { this.speaker = speaker; }