mvxBindableListViewのオブジェクトのプロパティをMVVMCrossとAndroidにバインドしようとすると問題が発生します。
クラスの構造は次のとおりです。
public class A
{
public string MyPropertyA1 { get; set; }
public int MyPropertyA2 { get; set; }
}
public class B
{
public int MyPropertyB1 { get; set; }
public int MyPropertyB2 { get; set; }
}
public class C
{
public int MyPropertyC1 { get; set; }
public A MyPropertyA { get; set; }
public B MyPropertyB { get; set; }
}
mvxBindableListViewは次のようなものです。
<?xml version="1.0" encoding="utf-8"?>
<Mvx.mvxBindableListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/Android.Client"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
local:MvxBind="{'ItemsSource':{'Path':'Results'}}"
local:MvxItemTemplate="@layout/detail_viewmodel" />
結果は次のとおりです。publicObservableCollectionResults{get; セットする; }およびdetail_viewmodelは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/Android.Client"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dip"
android:layout_marginTop="6dip"
android:textAppearance="?android:attr/textAppearanceLarge"
local:MvxBind="{'Text':{'Path':'MyPropertyA.MyPropertyA1'}}" />
アプリケーションを実行すると、変数'Results'を含む要素の数を含むmvxBindableListViewが表示されますが、行は空です。
誰が何が起こっているのか知っていますか?ありがとう