0
属性更改事件我发现Jaganathan Bantheswaran一个很好的职位在http://www.c-sharpcorner.com/uploadfile/dbd951/how-to-handle-property-changed-event-in-lightswitch-2011/使用其他实体
我理解这个概念,但我有使用其他实体应用它的麻烦。例如,将文凭百分比移到它自己的实体,将HS百分比移到它自己的实体。
我试过以下,但得到一个参数异常,无法找到控件DPercentage。
void CreateNewStudent_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName.Equals("EntryMode"))
{
if (this.StudentProperty.EntryMode.Equals("LE"))
{
this.FindControl("DiplomaPercentage").IsVisible = true;
this.FindControl("HSSPercentage").IsVisible = false;
this.FindControl("DPercentage").IsVisible = false;
}
else
{
this.FindControl("DiplomaPercentage").IsVisible = false;
this.FindControl("HSSPercentage").IsVisible = true;
}
}
}