MVVMCross изменение ViewModel в MvxBindableListView
Маленькая проблема с моим Android-приложением, и я не знаю, как ее решить с помощью MVVM Cross.
Вот моя модель
public class Article
{
string Label{ get; set; }
string Remark { get; set; }
}
Моя ViewModel
public class ArticleViewModel: MvxViewModel
{
public List<Article> Articles;
....
}
My 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>
...
И тут возникает моя проблема, & quot; article_rowlayout & quot;
...
<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'}}"
/>
...
& Quot; Нажмите & quot; команда под названием «MyTest» связан с элементом, заданным MvxBindableListView. Другими словами, нажмите «Поиск» для команды & quot; MyTest & quot; в моей модели «Статья» вместо моей модели представления. Как я могу изменить это поведение, чтобы связать мою ViewModel & quot; ArticleViewModel & quot; кто отвечает за мой MvxBindableListView?
Какие-либо предложения?