void UpdateGroupTracking() { ClearGroupTracking(); for (int n = 0; n < _groupSource.Count; n++) { var source = ItemsSourceFactory.Create(_groupSource[n] as IEnumerable, this); source.HasFooter = _hasGroupFooters; source.HasHeader = _hasGroupHeaders; _groups.Add(source); } }
internal ItemsViewAdapter(ItemsView itemsView, Func <View, Context, ItemContentView> createItemContentView = null) { CollectionView.VerifyCollectionViewFlagEnabled(nameof(ItemsViewAdapter)); ItemsView = itemsView; _createItemContentView = createItemContentView; ItemsSource = ItemsSourceFactory.Create(itemsView.ItemsSource, this); if (_createItemContentView == null) { _createItemContentView = (view, context) => new ItemContentView(context); } }
internal ItemsViewAdapter(ItemsView itemsView, Func <IVisualElementRenderer, Context, AView> createView = null) { CollectionView.VerifyCollectionViewFlagEnabled(nameof(ItemsViewAdapter)); ItemsView = itemsView; _createView = createView; _itemsSource = ItemsSourceFactory.Create(itemsView.ItemsSource, this); if (_createView == null) { _createView = (renderer, context) => new ItemContentView(renderer, context); } }
internal ItemsViewAdapter(ItemsView itemsView, Func <View, Context, ItemContentView> createItemContentView = null) { Xamarin.Forms.CollectionView.VerifyCollectionViewFlagEnabled(nameof(ItemsViewAdapter)); ItemsView = itemsView ?? throw new ArgumentNullException(nameof(itemsView)); UpdateUsingItemTemplate(); UpdateHeaderOffset(); UpdateHasFooter(); ItemsView.PropertyChanged += ItemsViewPropertyChanged; _createItemContentView = createItemContentView; ItemsSource = ItemsSourceFactory.Create(itemsView.ItemsSource, this); if (_createItemContentView == null) { _createItemContentView = (view, context) => new ItemContentView(context); } }
protected override TItemsViewSource CreateItemsSource() { return((TItemsViewSource)ItemsSourceFactory.Create(ItemsView, this)); }
protected virtual TItemsViewSource CreateItemsSource() { return((TItemsViewSource)ItemsSourceFactory.Create(ItemsView, this)); }