I am currently working in wpf. I was animating the color of textblock control inside the tab item. When the tab is selected, i want to change the foreground to white, i-e
<ColorAnimation
Storyboard.TargetName="buttonText"
Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)"
To="White" Duration="0:0:.1" />
the tab control code is;
<TabControl Name="tabSteps" Template="{StaticResource OfficeTabControl}">
<TabItem Header="Info" IsSelected="True">
<TextBlock>Info content</TextBlock>
</TabItem>
<TabItem Header="Recent">
<TextBlock>Recent content tab</TextBlock>
</TabItem>
<TabItem Header="New">
<TextBlock>New content tab</TextBlock>
</TabItem>
<TabItem Header="Print">
<TextBlock>Print content tab</TextBlock>
</TabItem>
<TabItem Header="Save & Send">
<TextBlock>Save & send content tab</TextBlock>
</TabItem>
<TabItem Header="Help">
<TextBlock>Help tab</TextBlock>
</TabItem>
</TabControl>
I want to target the textblock. But it isn't working. Any help will be appreciated. I am following this work http://www.codeproject.com/Articles/155211/Building-a-control-template-style-for-the-tabContr.aspx