Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

[BindableAttribute(true)] 
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)

<object>
  <object.Header>
    <UIElement />
  </object.Header>
</object>

<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

HeaderProperty

Metadata properties set to true

None

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"  
                      Background="DarkBlue" 
                      BorderBrush="Black"
                      Header="Header"
                      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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft