I am trying to highlight Xamarin Forms CollectionView Item, but it seems it doesn't highlight. While debugging I found out that if I remove the SwipeView Gesture event it works as expected. Additionally, in the current code the selection item is changed, but the color is not changning. How can I highlight the selected item?
<CollectionView ItemsSource="{Binding SomeList}"
SelectedItem="{Binding CurrentItem}" SelectionMode="Single" x:Name="itemView">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical" Span="1"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<SwipeView>
<SwipeView.GestureRecognizers>
<SwipeGestureRecognizer Direction="Right"
Command="{Binding BindingContext.SwipGestureCommand, Source={x:Reference itemView}}"
CommandParameter="right"/>
</SwipeView.GestureRecognizers>
<StackLayout Orientation="Vertical" Padding="5">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup Name="CommonStates">
<VisualState Name="Normal" />
<VisualState Name="Selected">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="Yellow" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Label LineBreakMode="WordWrap" Text="{Binding SomeText}"/>
</StackLayout>
</SwipeView>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
How to highlight the selected collectionview item?
