Wednesday, January 11, 2012

How to Change the Font Size of a WPF Tab Control’s Header

To change the font size of the tab header of a wpf tab control you have to redefine the ItemTemplate property of the Tab Control.

This is a question I have heard a lot, so I decided to blog about it for those of you needing to do the same thing. Here is a code sample.

<DataTemplate x:Key=”temp”>

<TextBlock Text=”{Binding}” FontSize=”20”/>

</DataTemplate>

 

<TabControl …. ItemTemplate=”{DynamicResource temp}”/>

 

That’s all there is to it.

Happy Coding!

1 comment:

  1. Hi there! The smaller font under each word tells the actual name of the font. The "sparkling" one is called Sweet Pea font and the link is: http://www.dafont.com/sweet-pea.font
    The clickable links to all of them are right under the image!
    Thanks!

    ReplyDelete