我正在使用 silverlightdatgrid,并且每个列标题都有如下样式
<Style x:Name="mytemplate" x:Key="mytemplate" xmlns:dataprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
TargetType="dataprimitives:DataGridColumnHeader">
<Setter Property="ContentTemplate" >
<Setter.Value>
<DataTemplate x:Name="ColHeaderTemplategrid">
<StackPanel>
<TextBlock Text="{Binding this.Content}" ></TextBlock>
<TextBox x:Name="txtfilterBox" KeyDown="txtfilterBox_KeyDown" Width="40"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
现在的问题是如何将每个列标题值绑定为堆栈面板内文本块的文本。我只是尝试使用 Text="{Binding this.Content}" ,但它不起作用。如何将列标题值绑定为文本块的文本