This is a migrated thread and some comments may be shown as answers.

GridViewHeaderRow VerticalContentAlignment and VerticalAlignment don't seem to work

1 Answer 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
R
Top achievements
Rank 1
R asked on 15 Aug 2014, 04:24 PM
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"/>
            </Style>

1 Answer, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 18 Aug 2014, 07:40 AM
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"/>
</Style>

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


Regards,
Vanya Pavlova
Telerik
 
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.
 
Tags
GridView
Asked by
R
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or