MVVMCross와 안드로이드가있는 mvxBindableListView에서 객체의 프라퍼티를 바인딩하려고 할 때 문제가 있습니다.안드로이드에서 mvxBindableListView에 프라퍼티 바인딩하기
클래스의 구조는 다음과 같습니다
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" />
: 공공 ObservableCollection에 결과가 {얻을; 세트; 이 응용 프로그램을 실행할 때 변수 '결과'를 포함 요소의 수와 나에게 mvxBindableListView가 표시되면
<?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'}}" />
하지만 행은 비어} 과 detail_viewmodel입니다.
누구에게 무슨 일이 일어나고 있는지 알고 계십니까? 포함
public class Thing
{
public string Life { get; set; }
public Thing()
{
Life = Guid.NewGuid().ToString();
}
}
public class SimpleEmail
{
public Thing MyThing { get; set; }
public string From { get; set; }
public string Header { get; set; }
public string Message { get; set; }
public SimpleEmail()
{
MyThing = new Thing();
}
}
그리고 템플릿 : 감사