日期:2014-05-17 浏览次数:20919 次
List<students> stulist = new List<students>();
for (int i = 0; i < 3; i++)
{
students stu = new students();
stu.Age = i;
stu.Name = i + "haha";
stu.Sex = "男的";
stulist.Add(stu);
}
<ListView.View>
<GridView x:Name="listgrdkecheng">
<GridViewColumn x:Name="kechengbianhao" Header="姓名" Width="200"/>
<GridViewColumn x:Name="kechengbianhao" Header="年龄" Width="200"/>
<GridViewColumn x:Name="kechengbianhao" Header="性别" Width="200"/>
<GridViewColumn x:Name="kechengbianhao" Header="性别" Width="200">
<GridViewColumn.CellTemplate>
<Label Content="{Binding Sex}" />
</GridViewColumn.CellTemplate>
</GridViewColumn>