Dela via


ContentPresenter.ContentTemplate Property

Definition

Gets or sets the template that is used to display the content of the control.

DataTemplate ContentTemplate();

void ContentTemplate(DataTemplate value);
public DataTemplate ContentTemplate { get; set; }
var dataTemplate = contentPresenter.contentTemplate;
contentPresenter.contentTemplate = dataTemplate;
Public Property ContentTemplate As DataTemplate
<ContentPresenter ContentTemplate="{Binding}"/>

Property Value

A DataTemplate that defines the visualization of the content. The default is null.

Applies to