I have an ItemTemplate and and SelectedItemTemplate, where each item is supposed to turn orange when selected. However, selecting in most places on the list selects one of the first three items, and then when I scroll down, the bottom three are selected, scroll up, and the top three are also all suddenly selected. I cannot specifically and reliably select anything else.
Here is my code:
______________________________________________________________________________
<StackLayout Padding="20" BackgroundColor="White">
<listview:SfListView x:Name="listView" IsScrollingEnabled="True" ItemSpacing="0,10"
SelectionMode="Multiple" SelectionBackgroundColor="Transparent">
<listview:SfListView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Subject</x:String>
<x:String>Subject</x:String>
<x:String>Subjecte</x:String>
<x:String>Subject</x:String>
<x:String>Subjecte</x:String>
<x:String>Subject</x:String>
<x:String>Subject</x:String>
<x:String>Subjecte</x:String>
<x:String>Subject</x:String>
<x:String>Subject</x:String>
<x:String>Subjecte</x:String>
<x:String>Subject</x:String>
<x:String>Subject</x:String>
</x:Array>
</listview:SfListView.ItemsSource>
<listview:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Frame CornerRadius="45" BackgroundColor="LightBlue" Padding="20,10"
HasShadow="False">
<StackLayout VerticalOptions="FillAndExpand">
<Label Text="{Binding .}"
TextColor="Black"/>
</StackLayout>
</Frame>
</ViewCell>
</DataTemplate>
</listview:SfListView.ItemTemplate>
<listview:SfListView.SelectedItemTemplate>
<DataTemplate>
<ViewCell>
<Frame CornerRadius="45" BackgroundColor="Orange" Padding="20,10"
HasShadow="False">
<StackLayout VerticalOptions="FillAndExpand">
<Label Text="{Binding .}"
TextColor="White"/>
</StackLayout>
</Frame>
</ViewCell>
</DataTemplate>
</listview:SfListView.SelectedItemTemplate>
</listview:SfListView>
</StackLayout>
_____________________________________________________________________
This issue is stopping my progress pretty badly - I'd very much like to use the SfListView over the standard Xamarin controls, but no use in a list if I can't select most items on it.