How do I get the selected item in MvxLIstView

53 Views Asked by At

I have added Item Click in MvxBind property.But I am unable to send the selected item along with its position.Help me with this.

Here i need Item.position or item to be sent.

 public ICommand ListItemSelected
 {

      get{

          return new MvxCommand<Person>(item =>{
                    _navigationService.Navigate<ThirdViewModel>(item);
          });
      }
 }

I am not able to send item here.I have added that item in ThirdViewModel constructor.

1

There are 1 best solutions below

0
Sushma srinivas On BEST ANSWER

I found the mistake.

public IMvxCommand listItemSelected
        {
            get
            {
               return new MvxCommand<Person>((item) =>
                {
                    _navigationService.Navigate(new ThirdViewModel(item));
                });
            }
        }