【发布时间】:2010-11-08 20:25:39
【问题描述】:
假设我有像这样的实体图
人->学生
然后在 xaml 中,我有以下类型的绑定(人是 VM 的属性):
<TextBox Text="{Binding People.Name, Mode=TwoWay}" />
<TextBox Text="{Binding People.Student.StudentNo, Mode=TwoWay}" /> <!-- this bounding is not working -->
在 VM 中,实现 IEditableObject。我有一些类似的代码:
public void BeginEdit()
{
((IEditableObject)this.People).BeginEdit();
((IEditableObject)this.People.Student).BeginEdit(); //this code not working
//....
}
运行应用时,绑定到 People 的所有数据都可以。
绑定到 Student 的所有数据都不起作用。
如何解决?
【问题讨论】:
标签: data-binding silverlight-4.0 wcf-ria-services