-api-id | -api-type |
---|---|
P:Windows.UI.Xaml.Controls.ListViewBase.Header |
winrt property |
Gets or sets the content for the list header.
<listViewBase Header="headerString"/>
- or -
<listViewBase>
<listViewBase.Header>
headerObject
</listViewBase.Header>
</listViewBase>
- headerString
- headerStringA text string that serves as header content.
- headerObject
- headerObjectAn 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.
By default, the header is shown at the top for a ListView, and on the left for a GridView. If the FlowDirection property is set to RightToLeft, the header is shown on the right for a GridView.
You can use a data template for the Header by setting the HeaderTemplate property.
Here's a GridView header that contains a StackPanel with text and an image. This Extensible Application Markup Language (XAML) is a simplified version of the GridView used in GroupDetail
page of the Microsoft Visual Studio Grid App template.
[!code-xamlGridViewHeader]