How to set the TabItem Header in bold?

0

I have the following TabItem :

<TabItem Header="TESTE" x:Name="planoCargaBalanca1" FontWeight="Bold">

I want the Header to be in bold , I tried to use FontWeight="Bold" but all my content was in bold.

How to leave only Header text in bold ?

    
asked by anonymous 16.02.2018 / 18:49

1 answer

0

I found this solution in StackOverFlow

a> that solved my problem.

<TabControl.Resources>
        <Style TargetType="{x:Type TabItem}">
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                        <DataTemplate>
                            <TextBlock FontWeight="Bold" Text="{Binding}"/>
                        </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        </TabControl.Resources>
    
16.02.2018 / 19:05