Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 2.25 KB

hubsection_header.md

File metadata and controls

49 lines (35 loc) · 2.25 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.HubSection.Header
winrt property

Microsoft.UI.Xaml.Controls.HubSection.Header

-description

Gets or sets the content for the hub section header.

-xaml-syntax

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

-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 section header. The default is **null**.

-remarks

Add a header to let users know the context of your Hub section. It's important to remember that although you can use arbitrary content in the header, the height of the header affects the amount of vertical space available for your hub section content. The section header scrolls with the hub section.

You can use a data template for the header by setting the HeaderTemplate property.

You can make a section header interactive by setting the IsHeaderInteractive property to true. Typically, the user can tap an interactive header to navigate to the corresponding app section page.

You can respond to a tapped header by handling the Hub.SectionHeaderClick event. You get the section that was clicked from the SectionHeaderClickEventArgs.Section property of the event data.

When its IsHeaderInteractive property is true, the default header includes the text, See more. When a user taps the See more text, the SectionHeaderClick event is raised. The text is rendered as a hyperlink, which uses the user selected system accent color by default.

-examples

-see-also

HeaderTemplate, IsHeaderInteractive