Пример #1
0
 public object GetBindingContextForReusedCell(FastCell cell)
 {
     if (OriginalBindingContextsForReusedItems.ContainsKey(cell))
     {
         return(OriginalBindingContextsForReusedItems[cell]);
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
 public void RecycleCell(FastCell newCell)
 {
     if (newCell == _fastCell)
     {
         _fastCell.BindingContext = _fastCell.OriginalBindingContext;
     }
     else
     {
         _fastCell.BindingContext = newCell.BindingContext;
     }
     _fastCell.BindingContext = newCell.BindingContext;
 }
Пример #4
0
 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;
         }
     }
 }
Пример #5
0
 void CacheBindingContextForReusedCell(FastCell cell)
 {
     OriginalBindingContextsForReusedItems[cell] = cell.BindingContext;
 }
Пример #6
0
 public void CacheCell(FastCell cell, NativeCell view)
 {
     CellItemsByCoreCells[view] = cell;
     OriginalBindingContextsForReusedItems[cell] = cell.BindingContext;
 }