ItemsPresenter.Header property

Gets or sets the content for the items header.

Syntax


public object Header { get; set; }


<ItemsPresenter Header="headerString"/>



<ItemsPresenter>
  <ItemsPresenter.Header>headerObject</ItemsPresenter.Header>
</ItemsPresenter>


XAML Values

headerString

A text string that serves as header content.

headerObject

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

Property value

Type: System.Object [.NET] | Platform::Object [C++]

The content of the items header. The default value is null.

Remarks

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

Windows 8.1:  Header alignment is handled differently in apps compiled for Windows 8 than in apps compiled for Windows 8.1.

  • In an app compiled for Windows 8, the header is always left-aligned when the orientation of the items is Horizontal, or top-aligned when the orientation is Vertical. VerticalAlignment and HorizontalAlignment values that you set are ignored.
  • In an app compiled for Windows 8.1, you can specify the header alignment. VerticalAlignment and HorizontalAlignment values that you set are not ignored.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ItemsPresenter

 

 

Show:
© 2015 Microsoft