// dataGrid要显示的绑定类
public class Student
{
public long id { get; set; } // ID
public string name {get; set;}
public string ip { get; set; }
public Group group;
}
public class Group
{
public string groupName;
public string groupIp;
}
如何让下面的XAML的DataGrid绑定的时候显示Student里面的group类型的groupName信息?
<DataGrid>
<DataGrid.Columns >
<DataGridTextColumn Binding="{Binding ???}" Header="ID" />
<DataGridTextColumn Binding="{Binding ???}" Header="学生姓名" />
<DataGridTextColumn Binding="{Binding ???}" Header="学生IP" />
<DataGridTextColumn Binding="{Binding ???}" Header="学生所属组名" />
<DataGridTextColumn Binding="{Binding ???}" Header="学生所属组IP" />
<DataGridTextColumn Width="*" />
</DataGrid.Columns>
</DataGrid>