GridViewHeaderRow VerticalContentAlignment and VerticalAlignment don't seem to work

2 posts, 1 answers
  1. R
    R avatar
    13 posts
    Member since:
    Jun 2014

    Posted 15 Aug 2014 Link to this post

    Hi, the GridViewHeaderRow VerticalContentAlignment and VerticalAlignment properties don't seem to work. 

    The VerticalContentAlignment and VerticalAlignment have no affect on the grid and the header text always appears aligned to the bottom.

    I'm using your Office Black style as a base style and the xaml below.

    Can you help me correct this issue please?

                <Style TargetType="telerik:GridViewHeaderRow">
                    <Setter Property="Height" Value="18"/>
                    <Setter Property="MinHeight" Value="18"/>
                    <Setter Property="MaxHeight" Value="18"/>
                    <Setter Property="VerticalContentAlignment" Value="Top"/>
                    <Setter Property="VerticalAlignment" Value="Top"/>
                    <Setter Property="BorderThickness" Value="0,0,0,0"/>
  2. Answer
    Vanya Pavlova
    Vanya Pavlova avatar
    2019 posts

    Posted 18 Aug 2014 Link to this post

    Hi Russel,

    Thank you for contacting us.

    If you need to change the content alignment of a header cell, you should set VerticalContentAlignment property of GridViewHeaderCell to Top, as proposed below:

    <Style TargetType="telerik:GridViewHeaderCell" BasedOn="{StaticResource GridViewHeaderCellStyle}">
         <Setter Property="VerticalContentAlignment" Value="Top"/>

    I'm attaching you sample demo, which you can use for testing purposes. 
    Hope this helps. 

    Vanya Pavlova
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top