我有一个ListView。如何以编程方式访问ListView标头?
答案 0 :(得分:3)
在WPF中:
var gridView = listView.View as GridView;
gridView.Columns[0].Header = "MyCustomHeader"; //setting header to the first column
MSDN上的更多信息ListView.View property,GridView class,GridView.Columns property