Office 2013 Theme - How To Not UpperCase Header Captions

2 posts, 0 answers
  1. Albert
    Albert avatar
    28 posts
    Member since:
    Sep 2012

    Posted 28 May 2014 Link to this post

    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
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 31 May 2014 Link to this post

    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.
     
Back to Top