tags:

views:

58

answers:

0

Hi there

I need a custom ToolKit:DataGrid

I have a style like these, It only modify the Columns Headers:

<Style x:Key="ColumnHeaderStyle_Green" TargetType="{x:Type tk:DataGridColumnHeader}">
    <Setter Property="Background" Value="#408080" />
    <Setter Property="Foreground" Value="White" />
    <Setter Property="FontFamily" Value="Arial" />
    <Setter Property="FontSize" Value="12" />
</Style>

Then added this to modify the Headder Gripper:

<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="{x:Type tk:DataGridColumnHeader}">
            <Grid>
                <Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" Style="{StaticResource ColumnHeaderRightGripperStyle}"/>
                <Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" Style="{StaticResource ColumnHeaderLeftGripperStyle}"/>
            </Grid>
        </ControlTemplate>
    </Setter.Value>
</Setter>

The Gripper Styles are:

<Style x:Key="ColumnHeaderRightGripperStyle" TargetType="{x:Type Thumb}">
    <Setter Property="Width" Value="1"/>
    <Setter Property="Background" Value="White"/>
</Style>

<Style x:Key="ColumnHeaderLeftGripperStyle" TargetType="{x:Type Thumb}">
    <Setter Property="Width" Value="1"/>
    <Setter Property="Background" Value="White"/>
</Style>

It works for the grippers but the rest disappear (the name of the column and the background)

What can I do to make it works, both in the same Style if possible?

THANKS!