<Style TargetType="dataprimitives:DataGridColumnHeader">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Border BorderThickness="0,0,0,1" BorderBrush="White">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="登录客户数" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Border>
<StackPanel Orientation="Horizontal" >
<Rectangle Fill="White" VerticalAlignment="Stretch" Width="1" />
<TextBlock Text="" Margin="2,0,0,0" Width="98" />
<Rectangle Fill="White" VerticalAlignment="Stretch" Width="1" />
<TextBlock Text=" 2009 " Margin="2,0,0,0" Width="98" x:Name="txt_today"/>
<Rectangle Fill="White" VerticalAlignment="Stretch" Width="1" />
<TextBlock Text=" 环比 " Margin="2,0,0,0" Width="98"/>
<Rectangle Fill="White" VerticalAlignment="Stretch" Width="1" />
<TextBlock Text=" 同比 " Margin="2,0,0,0" Width="95"/>
<Rectangle Fill="White" VerticalAlignment="Stretch" Width="1" />
</StackPanel>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
以上为xaml代码,如何在后台给 x:Name="txt_lastYear"的控件设置当前年份值,当然前台绑定的话也可以,求达人解答