An example with CollectionView:
<CollectionView ItemsSource="{Binding EmptyMonkeys}"
EmptyView="No items to display" />
Since migrating to MAUI .NET8 GA 8.0.3 (and Telerik 6.5) - on iOS the RadListView keeps repeatedly triggering the defined LoadOnDemand command to get more items even though list has not been scrolled by user.
the behavior is valid for the command, event and collection and when automatic load on demand mode is used.
When using manual mode, it works as expected.
The exception is easily reproducible in SDK Browser on iOS and MacCatalyst. Start the LoadOnDemandCommand or LoadOnDemandEvent example to see the exception. The LoadOnDemandCollection seems to work correctly, however.
The ListViewLoadOnDemandCollection can be used instead of the command/event as a temporary workaround, until the bug gets fixed.
When using .net maui multi-window and adding RadListView the following exception occurs on some mac machines:
Terminating app due to uncaught exception 'NSObjectNotAvailableException', reason: 'UIAlertView is deprecated and unavailable for UIScene based applications, please use UIAlertController!'
I used RadListView in a Grid, Grid has ColumnSpacing,
for example:
<Grid
RowSpacing="1"
ColumnSpacing="1"
WidthRequest="305"
HeightRequest="303"
BackgroundColor="#FF454545">
<Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>
<RowDefinition Height="82"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="152"/>
<ColumnDefinition Width="152"/>
</Grid.ColumnDefinitions>
<telerik:RadListView x:Name="listView" Grid.Row="5" Grid.ColumnSpan="2" WidthRequest="305">
<telerik:RadListView.ItemTemplate>
<DataTemplate>
<telerik:ListViewTemplateCell>
<telerik:ListViewTemplateCell.View>
<Grid BackgroundColor="Gray">
<Label Margin="10" Text="{Binding Name}" />
</Grid>
</telerik:ListViewTemplateCell.View>
</telerik:ListViewTemplateCell>
</DataTemplate>
</telerik:RadListView.ItemTemplate>
</telerik:RadListView>
</Grid>
I found the RadListView.Width is 304(ColumnDefinition plus), not 305.
Changing the ItemsSource property of the ListView causes it to recreate its cells. The problem is that the existing cells are never reclaimed by the garbage collector, so the memory usage grows constantly. Eventually, the application can run out of memory, if the ItemsSource is updated too many times.
Note: It is possible the memory leak is caused by the bindings holding objects longer than necessary. Similar memory leaks can be reproduced with the .NET MAUI CollectionView as well. Here are a few GitHub issues for the CollectionView that might be related:
When having a nested grid layouts with auto and definitive row heights, the content in the ListView ItemTemplate is not property sized only on iOS. On Android, MacCatalyst and WinUI the content is property sized.
Solution:
1. Using only auto-sized grid rows,
2. Using grouping and simplifying the layout, removing nested grid layouts, and using a vertical stack.
Hi Team,
Please expose the ScrollViewer, or expose a method on the RadListView that allows the developer to set a Y device-independent vertical position. Setting the Y value will trigger the internal/native scrollview to go to that position without any special animations or manipulation. Just a pure position set.
I need to be able to programmatically scroll to a specific position in the list. Yes, I am aware of the ScrollToItem methods, however that will not work in my case as I explicitly need the Y position (for acceleration and manipulation of the exact position).
As an example, here's how I am currently doing it for a ScrollView:
private async Task AutoScrollAsync()
{
while (!(this.ScrollVelocity == 0 || this.ScrollVelocity > 0 && this.IsScrolledToBottom() || this.ScrollVelocity < 0 && this.IsScrolledToTop()))
{
await this.scrollView.ScrollToAsync(0, this.CalculateNextScrollY(), false);
await Task.Delay(ScrollDelay);
}
this.StopScrolling();
}
I am hoping to be able to do the same thing for the RadListView.
Thank you,
Aaron
The bug can be reproduced quite easily with the SDK examples. Choose any ListView example from the LoadOnDemand category that uses LoadOnDemandMode set to Automatic, e.g. ListView/LoadOnDemand/LoadOnDemandEvent. Remove the initial items from the ItemsSource:
public ViewModel()
{
this.Source = new ObservableCollection<string>();
//for (int i = 0; i < 14; i++)
//{
// this.Source.Add(string.Format("Item {0}", i));
//}
this.LoadItemsCommand = new Command(this.LoadItemsCommandExecute);
}
Run the example to observe the exception almost immediately.
windows device with touch capabilities/monitor with touch -> the listview swipes and shows the swipe template, however pressing the button in the swipe or attempting to close the swipe makes the swipe content disappear and the entry to remain in the swiped position.Also multiple swipes are allowed. The swipe cannot be ended, etc.
Using the mouse - > swiping works as expected.