This question is locked. New answers and comments are not allowed.
Good morning,
I am trying to style the GridViewHeaderRow. The first thing I did was copy the exact template via blend as your instructions have directed me to do. Currently the only thing I'm changing is background color, as shown below. As soon as I do that I lose the Column groups that I have created. Any ideas?
I am trying to style the GridViewHeaderRow. The first thing I did was copy the exact template via blend as your instructions have directed me to do. Currently the only thing I'm changing is background color, as shown below. As soon as I do that I lose the Column groups that I have created. Any ideas?
<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik1="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"> <SolidColorBrush x:Key="GridView_HeaderInnerBorder" Color="#FF4B4B4B"/> <Controls:Office_BlackTheme x:Key="Theme"/> <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate"> <telerik1:GridViewHeaderIndentCell Controls:StyleManager.Theme="{StaticResource Theme}"/> </DataTemplate> <Controls:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> <ControlTemplate x:Key="GridViewHeaderRowTemplate" TargetType="telerik1:GridViewHeaderRow"> <telerik1:SelectiveScrollingGrid> <telerik1:SelectiveScrollingGrid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </telerik1:SelectiveScrollingGrid.ColumnDefinitions> <Border x:Name="PART_GridViewHeaderRowBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="4" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}"/> </Border> <telerik1:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3" Controls:StyleManager.Theme="{StaticResource Theme}"/> <Border x:Name="PART_IndicatorPresenter" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" telerik1:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{TemplateBinding RowIndicatorVisibility}" Width="25"> <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}"/> </Border> <telerik1:IndentPresenter x:Name="PART_IndentPresenter" Grid.Column="1" ItemTemplate="{StaticResource GridViewHeaderIndentCellDataTemplate}" IndentLevel="{TemplateBinding IndentLevel}" MinHeight="{TemplateBinding MinHeight}" telerik1:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Controls:StyleManager.Theme="{StaticResource Theme}"/> <Border x:Name="PART_HierarchyIndentPresenter" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,1,1" Grid.Column="2" telerik1:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HasHierarchy, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" Width="25"> <Border BorderBrush="{StaticResource GridView_HeaderInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}"/> </Border> </telerik1:SelectiveScrollingGrid> </ControlTemplate> <LinearGradientBrush x:Key="GridView_HeaderBackground" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF5B5B5B" Offset="1"/> <GradientStop Color="#FF868686"/> <GradientStop Color="#FF4F4F4F" Offset="0.42"/> <GradientStop Color="#FF0E0E0E" Offset="0.43"/> </LinearGradientBrush> <SolidColorBrush x:Key="GridView_HeaderOuterBorder" Color="#FF848484"/> <Style x:Key="TelerikHeaderRow" TargetType="telerik1:GridViewHeaderRow"> <Setter Property="Template" Value="{StaticResource GridViewHeaderRowTemplate}"/> <Setter Property="Background" Value="#0083ac"/> <!--<Setter Property="Background" Value="{StaticResource GridView_HeaderBackground}"/>--> <Setter Property="MinHeight" Value="27"/> <Setter Property="BorderBrush" Value="{StaticResource GridView_HeaderOuterBorder}"/> <Setter Property="BorderThickness" Value="1,0,0,1"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="Padding" Value="0"/> </Style></ResourceDictionary>