You can deselect the ListViewItem when navigating back to ListView page in Xamarin.Forms SfListView.
You can also refer the following article.
XAML
Bind SfListView.TapCommand to show the Popup page using Rg.Plugin.Popup framework. Bind SelectedItem to handle the selection.
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ListViewXamarin"
xmlns:syncfusion="clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms"
x:Class="ListViewXamarin.MainPage" Title="ListViewPage">
<ContentPage.BindingContext>
<local:ContactsViewModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<syncfusion:SfListView x:Name="listView" ItemSize="60" TapCommand="{Binding ShowPopup}" ItemsSource="{Binding contactsinfo}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
<syncfusion:SfListView.ItemTemplate >
<DataTemplate>
<Grid x:Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Source="{Binding ContactImage}" VerticalOptions="Center" HorizontalOptions="Center" HeightRequest="50" WidthRequest="50"/>
<Grid Grid.Column="1" RowSpacing="1" Padding="10,0,0,0" VerticalOptions="Center">
<Label LineBreakMode="NoWrap" TextColor="#474747" Text="{Binding ContactName}"/>
<Label Grid.Row="1" Grid.Column="0" TextColor="#474747" LineBreakMode="NoWrap" Text="{Binding ContactNumber}"/>
</Grid>
</Grid>
</DataTemplate>
</syncfusion:SfListView.ItemTemplate>
</syncfusion:SfListView>
</ContentPage.Content>
</ContentPage>
You can refer to our online document to work with Rg.Plugin.Popup using the following link,
C#
In the ShowPopup command, show the Popup page using PushAsync method of the PopupNavigation service.
public class ContactsViewModel : INotifyPropertyChanged
{
public Command<object> ShowPopup { get; set; }
public ContactsViewModel()
{
ShowPopup = new Command<object>(ShowPopupPage);
}
private async void ShowPopupPage(object sender)
{
//Setting binding context for the popup page to show the tapped item.
var popupPage = new ListViewPage();
popupPage.BindingContext = this;
await PopupNavigation.Instance.PushAsync(popupPage);
}
}
Output