Hi,
I have an issue because I want to use the tapped command to show another page and the selecteditem the first time it's tapped is null.
After it works well.
My sflistview ooks like this:
<listview:SfListView x:Name="catlistView"
HeightRequest="204"
IsVisible="{Binding ShowCategories, Mode=TwoWay}"
ItemsSource="{Binding WelcomeDtoValue.Categories}"
CurrentItem="{Binding SelectedCategoryMaster}"
ItemSize="204" SelectionBackgroundColor="Transparent"
SelectionMode="Single" Orientation="Horizontal" ItemSpacing="15"
VerticalOptions="Start">
<listview:SfListView.Behaviors>
<behaviors:EventToCommandBehavior EventName="ItemTapped" Command="{Binding CategorySelectedCommand}"/>
</listview:SfListView.Behaviors>
<listview:SfListView.ItemTemplate>
<DataTemplate>
<local:ElementItemTemplateView
IsVisible="{Binding Path=WelcomeDtoValue.Categories, Converter={StaticResource lvFull}}"
HeightRequest="204"
ShowFavourite="True"
ShowSelection="False"
/>
</DataTemplate>
</listview:SfListView.ItemTemplate>
</listview:SfListView>
When I tap on it the SelectedCategoryMaster the value is null.
The second time I tap on it it works.
It seems that when I tap on the item, the selected item has not been set.
How can I fix this?
PS: I don't want to use SelectionChanged event because if my user comes back to the page, the selection is still done and if it taps on the same viewcell nothing will happen.
And I do not want to set selecteditem to null foreach my views.
Thanks,