MVVMCross zmieniający ViewModel w MvxBindableListView
Mały problem z moją aplikacją na Androida i nie wiem, jak go rozwiązać za pomocą MVVM Cross.
Oto mój model
public class Article
{
string Label{ get; set; }
string Remark { get; set; }
}
Mój ViewModel
public class ArticleViewModel: MvxViewModel
{
public List<Article> Articles;
....
}
Mój layout.axml ...
<LinearLayout
android:layout_width="0dip"
android:layout_weight="6"
android:layout_height="fill_parent"
android:orientation="vertical"
android:id="@+id/layoutArticleList">
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/editSearch"
android:text=""
android:singleLine="True"
android:selectAllOnFocus="true"
android:capitalize="characters"
android:drawableLeft="@drawable/ic_search_24"
local:MvxBind="{'Text':{'Path':'Filter','Mode':'TwoWay'}}"
/>
<Mvx.MvxBindableListView
android:id="@+id/listviewArticle"
android:choiceMode="singleChoice"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
local:MvxItemTemplate="@layout/article_rowlayout"
local:MvxBind="{'ItemsSource':{'Path':'Articles'}}" />
</LinearLayout>
...
A oto mój problem, „article_rowlayout”
...
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/blue">
<TextView
android:id="@+id/rowArticleLabel"
android:layout_width="0dip"
android:layout_weight="14"
android:layout_height="wrap_content"
android:textSize="28dip"
local:MvxBind="{'Text':{'Path':'Label'}}" />
<ImageButton
android:src="@drawable/ic_modify"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="wrap_content"
android:id="@+id/rowArticleButtonModify"
android:background="@null"
android:focusable="false"
android:clickable="true"
local:MvxBind="{'Click':{'Path':'MyTest'}}"
/>
...
Polecenie „Kliknij” „MyTest” jest połączone z elementem podanym przez MvxBindableListView. Innymi słowy, kliknij Szukaj polecenia „MyTest” w moim modelu „Artykuł” zamiast mojego ViewModel. Jak mogę zmienić to zachowanie, aby połączyć mój ViewModel „ArticleViewModel”, który jest odpowiedzialny za mój MvxBindableListView?
Jakieś sugestie?