When updating to .net8 the following snippet doesn't work with target net8 (maui 8.0.3). Same works with net7 (up to 7.101).
Stops me from targeting net8.
<telerik:RadListView.FooterTemplate>
<DataTemplate>
<Grid
BackgroundColor="{AppThemeBinding Dark={StaticResource ListElementColorDark},
Light={StaticResource ListElementColorLight}}"
IsVisible="{Binding CanSearchMore}">
<telerik:RadBorder Padding="8,10" Style="{StaticResource ListItemContainer}">
<Label HorizontalOptions="Start" Text="{Binding SearchMoreText}" />
</telerik:RadBorder>
<Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding SearchMoreCommand}" />
</Grid.GestureRecognizers>
</Grid>
</DataTemplate>
</telerik:RadListView.FooterTemplate>
1. TapGestureRecognizer: Command is not executed / Click not detected
2. Style: Having a PointerOver in "ListItemContainer" works with net7. Doesn't work with net8
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.
The bug occurs on Android when removing an item from a group and using sticky group headers.
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:
I tried to make an horizontal listview, using ListViewGridLayout. I want only one row with all the items from the collection.
I don't know how to set the SpanCount properly.
In the template, the image is not displayed (the function ImageResource is working in other control), only the Label is displayed.
<telerik:RadListViewI 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.
There is a slow performance when scrolling, expand/collapse items when the ListView Groups are sticky and GroupHeaderTemplate is used.
Workaround:
1. Set IsGroupHeaderStickty to false.
or
2.. Use the default group header template
Hi Team,
When I use a RadEntry or Entry in the RadListView, it is fine when rendering flat data. However, when the items are grouped, the app has a native WinUI unhandled exception (that needs a 2nd instance of VS2022 to catch).
The only way to stop it was to not use an entry-like control like a Label.
Here is code to reproduce it, I've attached a runnable example
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"
xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.Maui.Controls.Compatibility"
xmlns:telerikListView="clr-namespace:Telerik.XamarinForms.DataControls.ListView;assembly=Telerik.Maui.Controls.Compatibility"
x:Class="EntryTests.MainPage">
<Grid>
<telerikDataControls:RadListView x:Name="rulesListView"
ItemsSource="{Binding Clients}"
VerticalScrollBarVisibility="Always">
<telerikDataControls:RadListView.GroupDescriptors>
<telerikListView:PropertyGroupDescriptor PropertyName="Username" />
</telerikDataControls:RadListView.GroupDescriptors>
<telerikDataControls:RadListView.ItemTemplate>
<DataTemplate>
<telerikListView:ListViewTemplateCell>
<!-- WORKS -->
<!--<Label Text="{Binding Username}" FontSize="14"/>-->
<!-- HARD CRASH -->
<telerik:RadEntry Text="{Binding Username}" FontSize="14" />
</telerikListView:ListViewTemplateCell>
</DataTemplate>
</telerikDataControls:RadListView.ItemTemplate>
</telerikDataControls:RadListView>
</Grid>
</ContentPage>
Version Note: The repro app is using UI for MAUI v0.9.0 because it was tested by Lance McCarthy with both 0.8.0 and 0.9.0 (this 0.9.0 was built on May 11th).
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!'