Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.95 KB

listviewbase_header.md

File metadata and controls

48 lines (34 loc) · 1.95 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.ListViewBase.Header
winrt property

Microsoft.UI.Xaml.Controls.ListViewBase.Header

-description

Gets or sets the content for the list header.

-xaml-syntax

<listViewBase Header="headerString"/>
- or -
<listViewBase>
  <listViewBase.Header>
    headerObject
  </listViewBase.Header>
</listViewBase>

-xaml-values

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.
## -property-value The content of the list header. The default value is **null**.

-remarks

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.

-examples

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]

-see-also

HeaderTemplate, HeaderTransitions, FlowDirection