ContentPresenter.ContentTemplateSelector Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
Show: