Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GridViewColumn.HeaderTemplateSelector Property

Gets or sets the DataTemplateSelector that provides logic to select the template to use to display the column header.

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

public DataTemplateSelector HeaderTemplateSelector { get; set; }
/** @property */
public DataTemplateSelector get_HeaderTemplateSelector ()

/** @property */
public void set_HeaderTemplateSelector (DataTemplateSelector value)

public function get HeaderTemplateSelector () : DataTemplateSelector

public function set HeaderTemplateSelector (value : DataTemplateSelector)

<object>
  <object.HeaderTemplateSelector>
    <MyDataTemplateSelectorImplementation .../>
  </object.HeaderTemplateSelector>
</object>
<object HeaderTemplateSelector="{ResourceExtensionDataTemplateClassKey}"/>
 ResourceExtension   StaticResource or DynamicResource. StaticResource typically provides better performance.  DataTemplateClassKey  An x:Key resource key that refers to a custom DataTemplateSelector subclass that implements a practical SelectTemplate override. For information about how to map your custom class, see XAML Namespaces and Namespace Mapping. You can also programmatically add an instance of your DataTemplateSelector class as a resource to the application resource dictionary.  MyDataTemplateSelectorImplementation  A subclass of DataTemplateSelector that implements a practical SelectTemplate override. For information about how to map your custom class, see XAML Namespaces and Namespace Mapping. 

Property Value

The DataTemplateSelector object that provides data template selection for each GridViewColumn. The default value is a null reference (Nothing in Visual Basic).

Identifier field

HeaderTemplateSelectorProperty

Metadata properties set to true

None

If both the HeaderTemplateSelector property and the HeaderTemplate property are set, the HeaderTemplate property takes precedence.

Properties that define the content, layout, and style of a column header are found on many related classes, and some of these properties have functionality that is similar or the same. For more information, 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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.