void ReleaseDesignerOutlets() { if (AdditiveView != null) { AdditiveView.Dispose(); AdditiveView = null; } if (NameLbl != null) { NameLbl.Dispose(); NameLbl = null; } }
public ProductCell(IntPtr handle) : base(handle) { this.DelayBind(() => { AdditiveView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight; additiveTableView = new UITableView( new CGRect(0 , 0 , AdditiveView.Bounds.Width , AdditiveView.Bounds.Height)); AdditiveView.AddSubview(additiveTableView); additiveTableView.RegisterClassForCellReuse(typeof(AdditiveCell), AdditiveCell.Key); var source = new MvxSimpleTableViewSource(additiveTableView, AdditiveCell.Key, AdditiveCell.Key); additiveTableView.Source = source; var set = this.CreateBindingSet <ProductCell, ProductForOrder>(); set.Bind(NameLbl).To(product => product.ProductInfo.Name); set.Bind(source).To(product => product.ProductInfo.OrderedAdditives); set.Apply(); }); }