HeaderedItemsControl.Header Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the item that labels the control.

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

Syntax

'Declaration
Public Property Header As Object
public Object Header { get; set; }
<sdk:HeaderedItemsControl>
  <sdk:HeaderedItemsControl>
    headerObject
  </sdk:HeaderedItemsControl>
</sdk:HeaderedItemsControl>
<sdk:HeaderedItemsControl Header="text"/>

XAML Values

  • headerObject
    An object element that serves as header content. Use discretion when using objects as header content; not all Silverlight objects are suitable for use within the limited presentation surface that appears for headers.

  • text
    A text string that serves as header content.

Property Value

Type: System.Object
The item that labels the control. The default value is nulla null reference (Nothing in Visual Basic).

Remarks

You can set a data template for the Header by using the HeaderTemplate property.

XAML usage for properties of HeaderedItemsControl also exists on TreeView. In this case, the object element you set the properties on is sdk:TreeView rather than sdk:HeaderedItemsControl.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.