Exemple #1
0
        public virtual object GetItem(UICollectionView collectionView, NSIndexPath indexPath)
        {
            var section = GroupedSource?.ElementAtOrDefault(indexPath.Section);

            if (section != null)
            {
                return(section.Cast <object>().ElementAtOrDefault(indexPath.Row));
            }
            else
            {
                return(Items.ElementAtOrDefault(indexPath.Row));
            }
        }
Exemple #2
0
 public override nint GetItemsCount(UICollectionView collectionView, nint section)
 {
     return(GroupedSource?.ElementAtOrDefault((int)section)?.Count() ?? Items.Count());
 }