我在iOS應用程序中使用MVVMCross/Xamarin。 我視圖模型,像這樣定義的屬性:MVVMCross,FieldBinding插件,iOS,代碼綁定不起作用
public readonly INC<Address> Entity = new NC<Address>();
其中
public class Address
{
public string Line1 { get; set; }
public string Line2 { get; set; }
public string Line3 { get; set; }
//other properties...
}
如果我這樣做雙向綁定,它的工作原理:
set.Bind(Line1Text).To("Entity.Line1").TwoWay();
如果我這樣做雙向綁定,它不起作用並輸出警告(見下文):
set.Bind(Line1Text).To(vm => vm.Entity.Value.Line1).TwoWay();
我得到的錯誤是綁定不構造。 從應用程序的輸出的警告:
2014年10月8日19:12:15.341 IosTemplate [8442:248933] MvxBind:警告: 12.63無法綁定:源屬性源未找到性能:在地址
價值
請指教,如何用lambda表達方式與INC/NC進行綁定。
謝謝,@Stuart – 2014-10-09 15:05:07