WPF - How to bind a DataGridTemplateColumn
问题 I am trying to get the name of the property associated with a particular DataGridColumn , so that I can then do some stuff based on that. This function is called when the user clicks context menu item on the column's header... This is fine for the out-of-the-box ready-rolled column types like DataGridTextColumn , since they are bound, but the problem is that some of my columns are DataGridTemplateColumns , which are not bound. private void GroupByField_Click (object sender, RoutedEventArgs e)