Change DataGrid column header text
问题 I have a list of a specific class type Person and I want to make a DataGrid with it. private void DataGrid_Loaded(object sender, RoutedEventArgs e) { List<Person> x; //Don't worry, x has data in it (sender as DataGrid).ItemsSource = x; } And the Person class: class Person { string fName, lName; } After all this I get a table with the headers: "fName" and "lName". How can I change that to: "First Name" and "Last Name"? 回答1: Here the Right way to do it : First Define an ObservableCollection in