昨天我才发现原来DataGrid不是WPF系统自带的。
我的DataGrid是从WPF Toolkit中来的。
WPF中的数据绑定功能确实很不错。
只要对DataGrid中的ItemSource赋予一个集合类。
DataGrid就会自动产生Columns.
自动产生的肯定不是你想要的,
要绑定某个字段就要使用Binding= {Binding Path=字段名称}
还是比较简单的。
就是外形调整起来比较麻烦,应该包含几种固定的 Style.
这个可能要慢慢的研究了。
今天就先到这里了。