public object GetBindingContextForReusedCell(FastCell cell) { if (OriginalBindingContextsForReusedItems.ContainsKey(cell)) { return(OriginalBindingContextsForReusedItems[cell]); } else { return(null); } }
public NativeCell(NSString cellId, FastCell fastCell) : base(UITableViewCellStyle.Default, cellId) { _fastCell = fastCell; _fastCell.PrepareCell(); // _fastCell.OriginalBindingContext = _fastCell.BindingContext; var renderer = Xamarin.Forms.Platform.iOS.Platform.CreateRenderer(fastCell.View); _view = renderer.NativeView; ContentView.AddSubview(_view); }
public void RecycleCell(FastCell newCell) { if (newCell == _fastCell) { _fastCell.BindingContext = _fastCell.OriginalBindingContext; } else { _fastCell.BindingContext = newCell.BindingContext; } _fastCell.BindingContext = newCell.BindingContext; }
public void RecycleCell(NativeCell view, FastCell newCell) { if (CellItemsByCoreCells.ContainsKey(view)) { var reusedItem = CellItemsByCoreCells[view]; if (OriginalBindingContextsForReusedItems.ContainsKey(newCell)) { reusedItem.BindingContext = OriginalBindingContextsForReusedItems[newCell]; } else { reusedItem.BindingContext = newCell.BindingContext; } } }
void CacheBindingContextForReusedCell(FastCell cell) { OriginalBindingContextsForReusedItems[cell] = cell.BindingContext; }
public void CacheCell(FastCell cell, NativeCell view) { CellItemsByCoreCells[view] = cell; OriginalBindingContextsForReusedItems[cell] = cell.BindingContext; }