Поделиться через


TabItem.HeaderTemplate Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the template that is used to display the content of the TabItem header.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)

Syntax

'Declaration
Public Property HeaderTemplate As DataTemplate
public DataTemplate HeaderTemplate { get; set; }
<sdk:TabItem>
  <sdk:TabItem.HeaderTemplate>
    inlineTemplate
  </sdk:TabItem.HeaderTemplate>
</sdk:TabItem>
<sdk:TabItem HeaderTemplate="resourceReferenceToDataTemplate"/>

XAML Values

  • inlineTemplate
    A single DataTemplate object element. That DataTemplate would typically have multiple child elements that define the visual appearance of the data representation.

  • resourceReferenceToDataTemplate
    A resource reference to an existing DataTemplate from a resources collection. The resource reference must specify the desired DataTemplate by key.

Property Value

Type: System.Windows.DataTemplate
The current template that is used to display TabItem header content.

Remarks

Dependency property identifier field: HeaderTemplateProperty

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.