Make tab same color as the tab content in WPF

I am trying to make the selected tab to be same color as the tab content and the other tab to be gray out.

For example in the attached image, I would like to make 'First' tab blue as the content is blue too.

Does anyone what I need to do that.  Thanks
<Window x:Class="tbTest.Window1"
    Title="Window1" Height="300" Width="300">
        <Style TargetType="TabControl" x:Key="SelectedBackgroundStyle">
            <Setter Property="Background"
                    Value="{Binding SelectedItem.Background, RelativeSource={x:Static RelativeSource.Self}}">
        <TabControl x:Name="Tabs" Style="{StaticResource SelectedBackgroundStyle}" Margin="36,60,37,12">
            <TabItem Header="First" Background="Blue">
                <TextBlock Height="144" Width="257">Test</TextBlock>
            <TabItem Header="Second" Background="Green"/>
            <TabItem Header="Third"  Background="Orange"/>

Open in new window

Who is Participating?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.