我有这样的模型
public class ExamMaster
{
public int Id {get;set;}
public string Name {get;set;}
public string StartDate {get;set;}
public string EndDate {get;set;}
public List<SubjectMaster> ExamSubjects {get;set;}
}
public class SubjectMaster
{
public string Name {get;set;}
public int MaxMark {get;set;}
public int MinMark {get;set;}
public int Score {get;set;}
}
如何在 xaml 视图上绑定 ExamMaster。我设法绑定这样的简单属性
<Grid>
<BoxView Color="#006793" />
<ContentView Padding="20">
<Label Text="{Binding Name}" FontAttributes="Bold" FontSize="15"/>
<Label Text="{Binding StartDate}" FontAttributes="Bold" FontSize="15"/>
But how to bind the ExamSubjects property which itself is a List??
</ContentView>
</Grid>
但是如何绑定本身是 List 的 ExamSubjects 属性?