ContentTemplateSelector Property

ContentPresenter.ContentTemplateSelector Property


Gets or sets the DataTemplateSelector, which allows the application writer to provide custom logic for choosing the template that is used to display the content of the control.

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

public DataTemplateSelector ContentTemplateSelector { get; set; }

Property Value

Type: System.Windows.Controls.DataTemplateSelector

A DataTemplateSelector object that supplies logic to return a DataTemplate to apply. The default is null.

This property is ignored if the ContentTemplate property is set. For more information, see ChooseTemplate.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft