BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
public class ContactsViewModel
{
Command< SfListView > selectionChangedCommand;
public Command< SfListView > SelectionChangedCommand
{
get { return selectionChangedCommand; }
protected set { selectionChangedCommand = value; }
}
public ContactsViewModel()
{
selectionChangedCommand = new Command< SfListView >(OnSelectionChanged);
}
private void OnSelectionChanged(SfListView listView)
{
var selectedItems= listView.SelectedItems;
}
} |
<listView:SfListView ItemSize="70" ItemsSource="{Binding contactsinfo}">
<listView:SfListView.Behaviors>
<local:EventToCommandBehavior EventName="SelectionChanged" Command="{Binding SelectionChangedCommand}" CommandParameter="{Binding Source={x:Reference listView}}"/>
</listView:SfListView.Behaviors>
</listView:SfListView> |