Using Maui.Controls 9.0.40, primarily for iOS 17.5 and 18.3.
I want to know what range of items are CURRENTLY DISPLAYED (that, is visible to the user). This will typically be about 20 items (out of about 500).
It seems like it should be easier than what I've got.
<CollectionView
...
Scrolled="histDataList_Scrolled"
>
and
private void myCollectionView_Scrolled(object sender, ItemsViewScrolledEventArgs e) {
firstVisItem = e.FirstVisibleItemIndex;
lastVisItem = e.LastVisibleItemIndex;
}
oh, and since the Scrolled event is not called when opened, I've added this crasiness when opened:
myCollectionView.ScrollTo(1);
myCollectionView.ScrollTo(0);
I can have up to 1000 items, and I'm trying to offer "select all that are visible", cuz otherwise it's pretty tiresome. What I'm doing can't be the "right" way, is it?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745077933a4609945.html
评论列表(0条)