HeaderedContentControl::HeaderTemplateSelector Property

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

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

[BindableAttribute(true)]
public:
property DataTemplateSelector^ HeaderTemplateSelector {
	DataTemplateSelector^ get ();
	void set (DataTemplateSelector^ value);
}
<object>
  <object.HeaderTemplateSelector>
    <MyDataTemplateSelectorImplementation .../>
  </object.HeaderTemplateSelector>
</object>
<object HeaderTemplateSelector="{ResourceExtension DataTemplateSelectorClassKey}"/>

XAML Values

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.

ResourceExtension

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

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. You can also programmatically add an instance of your DataTemplateSelector class as a resource to a resource dictionary.

Property Value

Type: System.Windows.Controls::DataTemplateSelector
A data template selector object. The default is nullptr.

Identifier field

HeaderTemplateSelectorProperty

Metadata properties set to true

None

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft