How do I enable text wrapping on all column headers?
问题 I would like to enable text wrapping on all column headers of my DataGrid, without disabling the other default header functionality, such as column resizing, sort direction indicator, etc. Is there a way to do this? 回答1: Or don't bother with the primitives in the app.xaml file and do the following (my objects): <DataGrid Name="WBdataGrid" AutoGenerateColumns="False" ColumnHeaderHeight="50" > <DataGrid.ColumnHeaderStyle> <Style TargetType="DataGridColumnHeader"> <Setter Property=