Editar

Compartilhar via


ContentPresenter.ContentTemplateSelector Property

Definition

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.

public:
 property System::Windows::Controls::DataTemplateSelector ^ ContentTemplateSelector { System::Windows::Controls::DataTemplateSelector ^ get(); void set(System::Windows::Controls::DataTemplateSelector ^ value); };
public System.Windows.Controls.DataTemplateSelector ContentTemplateSelector { get; set; }
member this.ContentTemplateSelector : System.Windows.Controls.DataTemplateSelector with get, set
Public Property ContentTemplateSelector As DataTemplateSelector

Property Value

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

Remarks

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

XAML Text Usage

For XAML information, see TemplateBinding Markup Extension.

Dependency Property Information

Identifier field ContentTemplateSelectorProperty
Metadata properties set to true AffectsMeasure

Applies to

See also