public void UpdateFrom(BaseBooleanImageElement newParent) { parent = newParent; UpdateImage(); label.Text = parent.Caption; SetNeedsDisplay(); }
public TextWithImageCellView(BaseBooleanImageElement parent, NSString Id) : base(UITableViewCellStyle.Value1, Id, parent) { this.parent = parent; label = new UILabel { TextAlignment = UITextAlignment.Left, Text = parent.Caption, Font = font }; button = UIButton.FromType(UIButtonType.Custom); button.TouchDown += delegate { parent.Value = !(bool)parent.Value; UpdateImage(); if (parent.Tapped != null) parent.Tapped(); }; ContentView.Add(label); ContentView.Add(button); UpdateImage(); }
public TextWithImageCellView(BaseBooleanImageElement parent, NSString Id) : base(UITableViewCellStyle.Value1, Id, parent) { this.parent = parent; label = new UILabel { TextAlignment = UITextAlignment.Left, Text = parent.Caption, Font = font }; button = UIButton.FromType(UIButtonType.Custom); button.TouchDown += delegate { parent.Value = !(bool)parent.Value; UpdateImage(); if (parent.Tapped != null) { parent.Tapped(); } }; ContentView.Add(label); ContentView.Add(button); UpdateImage(); }