public ElementDetailView(RectangleF frame, PeriodicTableViewController controller) : base(frame) { this.controller = controller; btnClose = new UIButton(new RectangleF(0, 0, 300, 44)); btnClose.SetTitle("Close", UIControlState.Normal); btnClose.TouchUpInside += (sender, e) => { controller.HideDetails(CellFrame); }; Add(btnClose); }