HeaderTemplateSelector Property

HeaderedContentControl.HeaderTemplateSelector Property

 

Gets or sets a data template selector that provides custom logic for choosing the template used to display the header.

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

[BindableAttribute(true)]
public DataTemplateSelector HeaderTemplateSelector { get; set; }

Property Value

Type: System.Windows.Controls.DataTemplateSelector

A data template selector object. The default is null.

If both the HeaderTemplateSelector and the HeaderTemplate properties are set, the template selector property is ignored.

<object HeaderTemplateSelector="{ResourceExtension DataTemplateSelectorClassKey}"/>

<object>
  <object.HeaderTemplateSelector>
    <MyDataTemplateSelectorImplementation .../>
  </object.HeaderTemplateSelector>
</object>

MyDataTemplateSelectorImplementation

A class derived from DataTemplateSelector that implements a practical SelectTemplate override. For information about how to map your custom class, see XAML Namespaces and Namespace Mapping for WPF XAML.

ResourceExtension

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

DataTemplateSelectorClassKey

The key that identifies the selector implementation being requested. The key refers to a derived class that implements a practical SelectTemplate override. For information about how to map your custom class, see XAML Namespaces and Namespace Mapping for WPF XAML. You can also programmatically add an instance of your DataTemplateSelector class as a resource to a resource dictionary.

Identifier field

HeaderTemplateSelectorProperty

Metadata properties set to true

None

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft