tags:

views:

7

answers:

0

I am using the HeaderStyle property to customize a Silverlight DataGrid column header. Is there a way to bind controls inside of the ControlTemplate to an object in a collection based on the column index? Something similar to the following?

<Style x:Key="GradeDefinitionHeaderStyle" TargetType="dataprimitives:DataGridColumnHeader">
<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate>
            <TextBlock Text="{Binding MyCollection[i]}"/>                        
        </ControlTemplate>
    </Setter.Value>
</Setter>