-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.ItemsPresenter.HeaderTemplate |
winrt property |
Gets or sets the DataTemplate used to display the content of the items header.
<ItemsPresenter>
<ItemsPresenter.HeaderTemplate>
singleDataTemplate
</ItemsPresenter.HeaderTemplate>
</ItemsPresenter>
- or -
<ItemsPresenter HeaderTemplate="resourceReferenceToDataTemplate"/>
- singleDataTemplate
- singleDataTemplateA single DataTemplate object element. That DataTemplate would typically have multiple child elements that define the visual appearance of the data representation.
- resourceReferenceToDataTemplate
- resourceReferenceToDataTemplateA resource reference to an existing DataTemplate from a resources collection. The resource reference must specify the desired DataTemplate by key through a {StaticResource} markup extension usage.
Windows 8.x 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.