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

Changing the uppercase behavior of headers with office 2013 theme

1 Answer 270 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 10 Jan 2015, 12:10 AM
Hi,

We're using the office 2013 theme and as a result, the headers of our gridviews show the text in uppercase.  This is expected due to the theme.

However, we'd like to have the header not uppercase this text.  The way we currently have our application using the theme is by including the various xaml files (including Telerik.Windows.Controls.GridView.xaml) as resource files and then we merge these in.

So we tried changing the following:

<ControlTemplate x:Key="CommonColumnHeaderTemplate" TargetType="grid:CommonColumnHeader">
        <Grid x:Name="PART_HeaderCellGrid" Background="Transparent">
            <Border x:Name="GridViewHeaderCell"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Margin="-1 0 1 0"/>
            <ContentControl x:Name="ContentPresenter"
                    Content="{Binding Content,Converter={StaticResource UppercaseConverter},RelativeSource={RelativeSource TemplatedParent}}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="Center"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Margin="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
    </ControlTemplate>

To this:

<ControlTemplate x:Key="CommonColumnHeaderTemplate" TargetType="grid:CommonColumnHeader">
        <Grid x:Name="PART_HeaderCellGrid" Background="Transparent">
            <Border x:Name="GridViewHeaderCell"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Margin="-1 0 1 0"/>
            <ContentControl x:Name="ContentPresenter"
                   
Content="{Binding Content,RelativeSource={RelativeSource TemplatedParent}}"                <----- CHANGE IS HERE
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="Center"
                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                    Margin="{TemplateBinding Padding}"
                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
        </Grid>
    </ControlTemplate>

But we think this must not be the right place to make the change.  Could you direct us to what we should change to get the header text showing with regular (not upper) casing?  Thanks!

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 14 Jan 2015, 08:35 AM
Hello,

Indeed, based on the design guidelines for Office2013 theme, all column headers, column group headers and group panel cells should be uppercase. A possible solution for achieving your goal can be found in the Office 2013 Theme - How To Not UpperCase Header Captions forum thread.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Matt
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or