我有一个WPF中的TabControl,有3个选项卡,并且每个选项卡标题旁边都有一张图片。这是一个例子:
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<Image Name="img" Height="auto" Width="auto" Source="images/1.png" />
<TextBlock Text="Login" Margin="2,0,0,0" VerticalAlignment="Center" />
</StackPanel>
</TabItem.Header>
</TabItem>
当选项卡被选中时,文本为黑色,背景为白色;当未选中时,颜色为浅灰色,文本略微较暗。这很好用,但是我不知道如何改变未选中时选项卡上的图像。现在所有的图像看起来都一样,都是绿色圆圈里面有数字,但是当选定一个选项卡时,我想将它更改为不同的图像,例如images/1_notselected.png 和 images/2_notselected.png。谢谢!