This documentation is archived and is not being maintained.

GridViewHeaderRowPresenter.ColumnHeaderTemplate Property

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

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public DataTemplate ColumnHeaderTemplate { get; set; }
/** @property */
public DataTemplate get_ColumnHeaderTemplate ()

/** @property */
public void set_ColumnHeaderTemplate (DataTemplate value)

public function get ColumnHeaderTemplate () : DataTemplate

public function set ColumnHeaderTemplate (value : DataTemplate)

<object ColumnHeaderTemplate="{ResourceExtensionTemplateResourceKey}"/>
 ResourceExtension   StaticResource or DynamicResource. StaticResource typically provides better performance.  TemplateResourceKey  An x:Key resource key that refers to a template resource. 

Property Value

The DataTemplate that is used to display the column header content. The default value is a null reference (Nothing in Visual Basic).

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: