ContentTemplate Property

ContentPresenter.ContentTemplate Property


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

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

public DataTemplate ContentTemplate { get; set; }

Property Value

Type: System.Windows.DataTemplate

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

The following example shows a style for the ComboBox control:

.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2015 Microsoft