【发布时间】:2014-10-08 23:17:08
【问题描述】:
我在我的 iOS 应用程序中使用 MVVMCross/Xamarin。 我有 ViewModel,其属性定义如下:
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-08 19:12:15.341 IosTemplate[8442:248933] MvxBind:警告: 12.63 无法绑定:source property source not found Property:Value on Address
请指教,如何使用 lambda 表达式方式与 INC/NC 进行绑定。
【问题讨论】: