private IndexRange CalculateVisibleItemsRange() { if (this.itemsPerPage == 0) { return(new IndexRange()); } int position = this.PositionToItemIndex(this.position + 0.01f); int endPosition = this.PositionToItemIndex((this.position + this.pageSize) - 0.01f); if ((position >= 0) && (endPosition == -1)) { endPosition = this.itemsCount - 1; } return(IndexRange.CreateFromBeginAndEnd(position, endPosition)); }
private IndexRange CalculateScreenRange() => IndexRange.CreateFromBeginAndEnd(this.PositionToItemIndexUnclamped(this.position + 0.01f), this.PositionToItemIndexUnclamped((this.position + this.pageSize) - 0.01f));