我有一个GridView
类似的追随者。
<Grid>
<ListView Margin="8,44,8,50" TabIndex="57" Name="CustomFieldList">
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn Header="Semester Name" Width="120" DisplayMemberBinding="{Binding FieldName}"/>
<GridViewColumn Header="Subjects" Width="150" DisplayMemberBinding="{Binding TypeValidations}"/>
</GridView>
</ListView.View>
</ListView>
</Grid>
我的课是;
public class DigreePrograme
{
public string semester{ get; set; }
public List<string> subjects { get; set; }
}
我有一个观察者集合,我已将其绑定到列表中。
static ObservableCollection<DigreePrograme> digreeList = new ObservableCollection<DigreePrograme>();
public ObservableCollection<DigreePrograme> DigreeList
{
get { return digreeList }
set { digreeList = value; OnPropertyChanged("DigreeList"); }
}
在FormFoad上
CustomFieldList.ItemsSource=DigreeList;
问题
semester
属性显示完美。但Subject
不列出。它显示为Collection。如何解决这个问题?