HeaderedItemsControl.Header Property

Gets or sets the item that labels the control. This is a dependency property.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public Object Header { get; set; }
/** @property */
public Object get_Header ()

/** @property */
public void set_Header (Object value)

public function get Header () : Object

public function set Header (value : Object)

    <UIElement />

<object Header="headerString"/>
 headerString  The string to use as a heading. 

Property Value

An object that labels the HeaderedItemsControl. The default value is a null reference (Nothing in Visual Basic). A header can be a string or a UIElement.

Identifier field


Metadata properties set to true


Content Model: For information on the content model for HeaderedItemsControl, see HeaderedItemsControl Content Model.

The following example shows how to use this property to set the header on a HeaderedItemsControl.

<!--Crate a HeaderedItemControl with a red header and green items.-->
<HeaderedItemsControl Name="hitemsCtrl"  
                      HeaderTemplate="{StaticResource RedHeaderTemplate}"
                      ItemsSource="{Binding Source={StaticResource Numbers}}"
                      ItemTemplate = "{StaticResource GreenItemTemplate}" />

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions