我在CollectionView
上设置了一个无限滚动逻辑,其中IsGrouped = True
。它在Android上可以正常工作,但从一开始它就不能在iOS,Windows和MacCatalyst上工作(因为该命令在这些平台上根本不执行)。现在,要从云中为我的应用程序检索的数据变得越来越庞大,我再也负担不起在集合中一次加载所有内容的费用了。
我能做些什么来解决这个问题吗?或者(如果这只是一个bug)有没有什么变通方法可以应用来避免设置一个按钮来逐个加载页面?
下面是XAML代码:
<Grid
Grid.Row="3"
VerticalOptions="Fill">
<CollectionView
ItemsSource="{Binding ListItemsGroup}"
SelectionMode="Single"
SelectedItem="{Binding CurrentItem, Mode=TwoWay}"
RemainingItemsThreshold="2"
RemainingItemsThresholdReachedCommand="{Binding LoadMoreItemsCommand}"
IsGrouped="True">
1条答案
按热度按时间siv3szwd1#
是的,这是一个已知的问题,在下面的链接中跟踪,您可以在那里跟进。
https://github.com/dotnet/maui/issues/10078
https://github.com/dotnet/maui/issues/13391
命令
RemainingItemsThresholdReachedCommand
仅适用于Android,但不适用于iOS或Windows。滚动没有效果,并且在命令RemainingItemsThresholdReachedCommand
中设置的断点从未被调用。