1

I defined the DataGridTemplateColumn.HeaderStyle as resource.

<UserControl.Resources>
 <Style x:Key="DataGridHeaderStyleProductName" TargetType="sdk:DataGridColumnHeader">
  <Setter Property="ContentTemplate">
   <Setter.Value>
    <DataTemplate>
     <StackPanel Orientation="Horizontal">
      <TextBlock x:Name="ProductName" Text="ProductName" />
     </StackPanel>
    </DataTemplate>
   </Setter.Value>
  </Setter>
 </Style>
</UserControl.Resources>

I need to modify the Text of TextBlock (ProductName) runtime. How can I modify?

  • see here: http://stackoverflow.com/questions/151682/dynamically-setting-the-header-text-of-a-silverlight-datagrid-column – RobSiklos Oct 28 '11 at 19:53

0 Answers0