#898 – Setting the Text that Appears on a TabItem
September 3, 2013 1 Comment
Each tab within a TabControl is represented by an instance of a TabItem. If you want some text to be displayed on the clickable portion of a tab, you can specify the text that should appear by setting the Header property of the TabItem.
<TabControl Margin="10" > <TabItem Header="Augustus"> <StackPanel Orientation="Horizontal"> <Image Source="Augustus.jpg" Height="100" Margin="5"/> <TextBlock Text="Augustus" VerticalAlignment="Center"/> </StackPanel> </TabItem> <TabItem Header="Tiberius"> <StackPanel Orientation="Horizontal"> <Image Source="Tiberius.jpg" Height="100" Margin="5"/> <TextBlock Text="Tiberius" VerticalAlignment="Center"/> </StackPanel> </TabItem> </TabControl>