Syncfusion.SfListView.XForms
Example 

SelectionChanging Event (SfListView)

Occurs when selecting an item at the execution time.
Syntax
public event ItemSelectionChangingEventHandler SelectionChanging
Event Data

The event handler receives an argument of type ItemSelectionChangingEventArgs containing data related to this event. The following ItemSelectionChangingEventArgs properties provide information specific to this event.

PropertyDescription
Gets a list that contains the items that were selected.  
(Inherited from System.ComponentModel.CancelEventArgs)
Gets a list that contains the items that were unselected.  
Remarks
The SelectionChanging event is a cancelable event and can be canceled by handling the event and setting the Cancel property to true. However, if the event is canceled, the selection process for the selected ListViewItem gets cancelled.
Example
The following example demonstrates how to wire the selection changing event in SfListView.
listView.SelectionChanging += ListView_SelectionChanging;  
            
private void ListView_SelectionChanging(object sender, ItemSelectionChangingEventArgs e)
{
   if (e.AddedItems[0] == ViewModel.Items[0])
       e.Cancel = true;
}
AssemblyVersion

Syncfusion.SfListView.XForms: 17.3451.0.26

See Also