我在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