public override nint GetItemsCount(UICollectionView collectionView, nint section) { var count = _itemsSource.Count; if (_wasEmpty && count > 0) { // We've moved from no items to having at least one item; it's likely that the layout needs to update // its cell size/estimate _layout?.SetNeedCellSizeUpdate(); } _wasEmpty = count == 0; return(count); }