<UserControl x:Class="HeaderBackgroundChange_SL.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"  
    xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"  
    xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <ControlTemplate x:Key="GridViewGroupPanelItemTemplate" TargetType="telerik:GridViewGroupPanelItem">
                <StackPanel x:Name="PART_GroupPanelItemStackPanel" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" Orientation="Horizontal">
                    <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" MinHeight="4"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Path x:Name="PART_InsertionPoint" Fill="White" Stretch="Fill" Height="4.677" HorizontalAlignment="Center" VerticalAlignment="Top" Width="6.414" Visibility="Collapsed" Grid.Row="0" Data="M206.66812,170.31108 L212.08199,170.31108 209.36058,173.98834 z"/>
                        <Grid x:Name="PART_ConnectingLine" Margin="{TemplateBinding Padding}" Visibility="Visible" Grid.Row="1">
                            <Path Fill="White" Stretch="Fill" Stroke="{x:Null}" Height="7" Margin="1,2,0,0" Width="4" Data="M0,0 L1,0 1,1 2,1 2,2 3,2 3,3 4,3 4,4 3,4 3,5 2,5 2,6 1,6 1,7 0,7 z"/>
                            <Path Fill="White" Stretch="Fill" Stroke="{x:Null}" Height="7" Width="4" Data="M0,0 L1,0 1,1 2,1 2,2 3,2 3,3 4,3 4,4 3,4 3,5 2,5 2,6 1,6 1,7 0,7 z"/>
                        </Grid>
                    </Grid>
                    <telerik:GridViewGroupPanelCell Content="{Binding DisplayContent}" SortDirection="{Binding SortDirection}" Background="Pink"/>
                </StackPanel>
            </ControlTemplate>

            <Style x:Key="GridViewGroupPanelItemStyle1" TargetType="telerik:GridViewGroupPanelItem">
                <Setter Property="Template" Value="{StaticResource GridViewGroupPanelItemTemplate}"/>
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="Padding" Value="2,0,2,2"/>
                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
            </Style>

            <Style  TargetType="gridView:GridViewHeaderCell" x:Key="MyHeaderCellStyle">
                <Setter Property="Background" Value="Transparent" />
            </Style>
        </Grid.Resources>
        <grid:RadGridView x:Name="GridViewFuncionario" GroupPanelItemStyle="{StaticResource GridViewGroupPanelItemStyle1}"
                          dragDrop:RadDragAndDropManager.AllowDrag="True"  
                          RowIndicatorVisibility="Collapsed"  
                          IsReadOnly="True"  
                          AutoGenerateColumns="False"  
                          CanUserFreezeColumns="False"  
                          CanUserReorderColumns="False"  
                          CanUserResizeColumns="False"  
                          CanUserSortColumns="False"  
                          IsFilteringAllowed="False"  
                          ColumnWidth="*"  
                          AlternationCount="2"  
                          AlternateRowBackground="#EFEFEF"  
                          >
            <grid:RadGridView.HeaderRowStyle>
                <Style TargetType="gridView:GridViewHeaderRow">
                    <Setter Property="Background" Value="Pink" />
                </Style>
            </grid:RadGridView.HeaderRowStyle>
            <grid:RadGridView.Columns>
                <grid:GridViewDataColumn Header="Nome" HeaderCellStyle="{StaticResource MyHeaderCellStyle}" DataMemberBinding="{Binding Nome}"  >
                </grid:GridViewDataColumn>
                <grid:GridViewDataColumn Header="Cargo"  HeaderCellStyle="{StaticResource MyHeaderCellStyle}" DataMemberBinding="{Binding Cargo}" />
            </grid:RadGridView.Columns>
        </grid:RadGridView>


    </Grid>
</UserControl>
