示例#1
0
        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);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
        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);
            }
        }
示例#5
0
 protected override TItemsViewSource CreateItemsSource()
 {
     return((TItemsViewSource)ItemsSourceFactory.Create(ItemsView, this));
 }
示例#6
0
 protected virtual TItemsViewSource CreateItemsSource()
 {
     return((TItemsViewSource)ItemsSourceFactory.Create(ItemsView, this));
 }