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!
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!