Ejemplo n.º 1
0
        protected override int OnQueryItemCountCore(VirtualList virtualList)
        {
            if (!this.IsConnected)
            {
                return(0);
            }

            DataGridVirtualizingCollectionView collectionView = this.CollectionView as DataGridVirtualizingCollectionView;

            // The VirtualPageManager was Disposed
            if (collectionView == null)
            {
                return(0);
            }

            DataGridVirtualizingCollectionViewGroup collectionViewGroup = this.GetLinkedCollectionViewGroup(virtualList) as DataGridVirtualizingCollectionViewGroup;

            Debug.Assert((collectionViewGroup != null) && (collectionView != null));

            return(collectionView.OnQueryItemCount(collectionViewGroup));
        }
        internal override int QueryItemCount()
        {
            DataGridVirtualizingCollectionView collectionView = this.GetCollectionView() as DataGridVirtualizingCollectionView;

            return(collectionView.OnQueryItemCount(this));
        }