Exemple #1
0
        protected virtual void ClearPropertyChanged(ContentCellContainer nativeCell)
        {
            var formsCell     = nativeCell.ContentCell as ContentCell;
            var parentElement = formsCell.Parent as CollectionView;

            formsCell.PropertyChanged -= nativeCell.CellPropertyChanged;

            if (parentElement != null)
            {
                parentElement.PropertyChanged -= nativeCell.ParentPropertyChanged;
            }
        }
Exemple #2
0
        public virtual UICollectionViewCell GetCell(ContentCell item, ContentCellContainer reusableCell, UICollectionView cv)
        {
            Performance.Start(out string reference);

            if (reusableCell.ContentCell != null)
            {
                ClearPropertyChanged(reusableCell);
            }

            reusableCell.ContentCell = item;

            SetUpPropertyChanged(reusableCell);

            reusableCell.UpdateNativeCell();

            Performance.Stop(reference);

            return(reusableCell);
        }