1

I am working on Xamarin Android Application.I don't know how to bind Icommand to Mvx.MvxListview. I have tried this:

<Mvx.MvxListView
    android:id="@+id/AddressList"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    local:MvxItemTemplate="@layout/myaddressestemplate"
    local:MvxBind="ItemsSource addresslist; ItemClick ItemSelect" />

In ViewModel I have created Icommand like this:

  public  ICommand ItemSelect
    {
        get
        {
            return new MvxCommand(() => {
                ShowViewModel<CheckOutViewModel>();
            });
        }
    }

But When I click on ListView item nothing Runs. Whats is the problem ? Please Help !

Dhruv Gohil
  • 842
  • 11
  • 34

1 Answers1

1
public IMvxCommand ItemSelect
        {
            get
            {
                return new MvxCommand<itemModelClass>((item) =>
                {
                    ShowViewModel<CheckOutViewModel>();
                });
            }
        }

try, this. i think you are creating and Icommand and returning a MvxCommand.

Setar
  • 140
  • 10