• XAML Logo

To enable Word Wrapping in the WPF Data Grid Column Header, simply add the following code snippet to your Application.xaml file;

<Style TargetType="{x:Type DataGridColumnHeader}">
    <Setter Property="ContentTemplate">
        <Setter.Value>
            <DataTemplate>
                <TextBlock TextWrapping="Wrap" Text="{Binding}"></TextBlock>
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style>
By | 2014-07-08T09:34:14+00:00 November 7th, 2012|.Net Framework, WPF|0 Comments

About the Author:

Leave A Comment