Header Property

HeaderedContentControl.Header Property


Gets or sets the data used for the header of each control.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public object Header { get; set; }

Property Value

Type: System.Object

A header object. The default is null.

Like the Content property of a ContentControl, the Header can be any type. The HeaderedContentControl uses the same logic to display the Header that is described in ContentControl.Content.

Identifier field


Metadata properties set to true


The following example creates a TabControl that contains two TabItem objects, which inherit from HeaderedContentControl. The first TabItem has UIElement objects as the content in both the Header and the Content: the Header is set to a StackPanel that contains an Ellipse and a TextBlock; the Content is set to a StackPanel that contains a TextBlock and a Label. The Header of the second TabItem is set to a string and the Content is set to a single TextBlock.

The following illustration shows the TabControl created by the previous example.


TabControl with different types in the Header property

The following example creates two DataTemplate objects to specify the appearance of the Header and Content of the HeaderedContentControl.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft