Edit

Share via


GridViewHeaderRowPresenter.ColumnHeaderTemplate Property

Definition

Gets or sets the template to use to display the column headers.

public:
 property System::Windows::DataTemplate ^ ColumnHeaderTemplate { System::Windows::DataTemplate ^ get(); void set(System::Windows::DataTemplate ^ value); };
public System.Windows.DataTemplate ColumnHeaderTemplate { get; set; }
member this.ColumnHeaderTemplate : System.Windows.DataTemplate with get, set
Public Property ColumnHeaderTemplate As DataTemplate

Property Value

The DataTemplate that is used to display the column header content. The default is null.

Remarks

When you implement this class as part of a GridView view mode, the value of this property is bound to the value of the ColumnHeaderTemplate property on the GridView.

If the ColumnHeaderTemplate property and the ColumnHeaderTemplateSelector property are both set, the ColumnHeaderTemplate takes precedence.

You can customize column headers in a GridView view mode by using a variety of properties that are found in this class and in related classes. For more information about these properties, and about the precedence between them, see GridView Column Header Styles and Templates Overview.

XAML Attribute Usage

<object ColumnHeaderTemplate="{ResourceExtension TemplateResourceKey}"/>

XAML Property Element Usage

XAML Values

ResourceExtension One of the following: StaticResource, or DynamicResource. See XAML Resources.

TemplateResourceKey The key that identifies the template being requested. The key refers to an existing resource in a ResourceDictionary.

Note

Property element syntax is technically possible, but not recommended. See Inline Styles and Templates. A binding reference using or is also possible, but uncommon.

Applies to

See also