How does one enable text wrapping on all column headers of a DataGrid
, without disabling the other default header functionality? Such as column resizing, sort d
Instead of assigning the column name directly to the DataGridColumn.Header property, I created a TextBlock containing the column name, set the TextWrapping property of the TextBlock to "Wrap" and assigned the TextBlock to the DataGridColumn.Header property. This preserves the default header functionality.
Example: