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

Office 2013 Theme - How To Not UpperCase Header Captions

1 Answer 175 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Albert
Top achievements
Rank 1
Albert asked on 28 May 2014, 08:30 PM
I am looking at using the Telerik WPF 2014.1's Office 2013 implicit theme. How can I allow mixed-casing in the Header Captions instead of always having upper-cased text?

Kind Regards,
Albert

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 31 May 2014, 01:36 PM
Hello Albert,


Thank you for contacting is. You should predefine the template of GridViewHeaderCell against Office2013 and remove the tag from the ContentPresenter within its template. 

<ContentControl x:Name="ContentPresenter" Foreground="{TemplateBinding Foreground}"
                                   Tag="office2013"
                       Style="{StaticResource StretchedContentControl}" Margin="{TemplateBinding Padding}"
                       IsTabStop="{TemplateBinding IsTabStop}"  Content="{TemplateBinding Content}"
                       ContentTemplate="{TemplateBinding ContentTemplate}"
                       VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                       HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
 
 
                 

The same should be done for GridViewGroupPanel:

<Style x:Key="GridViewGroupPanelStyle" TargetType="grid:GridViewGroupPanel">
       <Setter Property="Template" Value="{StaticResource GridViewGroupPanelTemplate}"/>
       <Setter Property="ItemsPanel" Value="{StaticResource GridViewGroupPanelItemsPanelTemplate}"/>
       <Setter Property="Background" Value="{telerik:Office2013Resource ResourceKey=MainBrush}"/>
       <Setter Property="Foreground" Value="{telerik:Office2013Resource ResourceKey=InvertedBrush}"/>
       <Setter Property="Padding" Value="7 9"/>
       <Setter Property="MinHeight" Value="30"/>
       <Setter Property="Tag" Value="office2013"/>
 

This tag is used to apply internal logic that returns the upper case version of the headers. 
I'm also attaching you sample project, which demonstrates how to achieve your goal. 


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
Albert
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or