Changing the uppercase behavior of headers with office 2013 theme

2 posts, 0 answers
  1. Matt
    Matt avatar
    1 posts
    Member since:
    Jul 2014

    Posted 09 Jan 2015 Link to this post

    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!
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 Jan 2015 Link to this post

    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.

     
Back to Top