Wrap the text in all the columns header using style xaml

2 posts, 0 answers
  1. Will
    Will avatar
    7 posts
    Member since:
    May 2014

    Posted 03 Sep 2015 Link to this post

    I don't know how to wrap columns header using just a style. I cannot use code behind because we don't have code behind. We use MVVM and CaliburnMicro so we don't have code behind the view. So I was trying to apply style to the grid and wrap all the headers every time I add grid to the form but I cannot accomplish this task. I don't want to do wrap to every column every time I add the grid. So my Idea was but it doesn't work. Please advice.

    <Style TargetType="telerik:GridViewDataColumn" >
            <Setter Property="Header">
                        <TextBlock TextWrapping="Wrap" Text="{Binding}"></TextBlock>

     Thank you,




  2. Yoan
    Yoan avatar
    1051 posts

    Posted 04 Sep 2015 Link to this post

    Hello Grazyna,

    You can easily achieve the desired behavior by using the following style:
                    <Style TargetType="telerik:GridViewHeaderCell">
                        <Setter Property="ContentTemplate">
                                    <TextBlock Text="long long logn text" TextWrapping="Wrap" />

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top