Share via


HubSection.Header 属性

定义

获取或设置中心节标头的内容。

public:
 property Platform::Object ^ Header { Platform::Object ^ get(); void set(Platform::Object ^ value); };
IInspectable Header();

void Header(IInspectable value);
public object Header { get; set; }
var object = hubSection.header;
hubSection.header = object;
Public Property Header As Object
<HubSection Header="headerString"/>
- or -
<HubSection>
  <HubSection.Header>
    headerObject
  </HubSection.Header>
</HubSection>

属性值

Object

Platform::Object

IInspectable

节标题的内容。 默认值为 null

注解

添加标头,让用户知道 中心 部分的上下文。 请务必记住,尽管可以在标头中使用任意内容,但标题的高度会影响中心分区内容的垂直空间量。 节标题与中心部分一起滚动。

可以通过设置 HeaderTemplate 属性为标头使用数据模板。

可以通过将 IsHeaderInteractive 属性设置为 true,使节标题具有交互性。 通常,用户可以点击交互式页眉以导航到相应的应用部分页面。

可以通过处理 Hub.SectionHeaderClick 事件来响应点击的标头。 获取从事件数据的 SectionHeaderClickEventArgs.Section 属性单击的部分。

其 IsHeaderInteractive 属性为 true 时,默认标头包括文本, 查看更多。 当用户点击“ 查看更多 文本”时,将引发 SectionHeaderClick 事件。 文本呈现为超链接,默认使用用户选择的系统主题色。

早期版本的说明

Windows 8.x 当其 IsHeaderInteractive 属性为 true 时,默认标头包括 V 形字形以及“悬停”和“已按下”视觉状态。 如果使用自定义 HeaderTemplate,则应提供类似的视觉提示来指示标头是交互式的。

适用于

另请参阅