To enable Word Wrapping in the WPF Data Grid Column Header, simply add the following code snippet to your Application.xaml file;
[code lang=”XML”]
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<TextBlock TextWrapping="Wrap" Text="{Binding}"></TextBlock>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
[/code]
Leave A Comment
You must be logged in to post a comment.