TabItemのForegroundにスタイルテンプレートが当たらない。
TextBlockの既定スタイルを作ると、そのForegroundが利いてしまい、TabItemのテンプレート(Expression Blendでスタイルを展開したものをベースにしたもの)で設定した選択時、非選択時にトリガしたForegroundが反映されない。
ぐぐったらありました。
<ContentPresenter.Resources> <Style TargetType="{x:Type TextBlock}"> <Setter Property="Foreground" Value="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type TabItem}}}"/> </Style> </ContentPresenter.Resources>
上記のコードをTabItemのHeaderのContentPresenterのテンプレートの定義内に配置すればOKということで。なるほど。