ControlTemplate is used to describe the control itself. Use TemplateBinding to bind the control's own attributes, such as {TemplateBinding Background}
DataTemplate is used to describe the Content of the Control. Use Binding to bind the attributes of the data object, for example, {Binding PersonName}
Generally, there is a ContentPresenter in the ControlTemplate. The ContentPresenter's ContentTemplate is of the ememplate type.
Control Type
-Template attribute (ControlTemplate type)
-ContentPresenter
-ContentTemplate (DataTemplate type)
ContentControl type
-The Template attribute (ControlTemplate type) is inherited from the Control
-ContentTemplate (DataTemplate type)
ItemsControl type
-The Template attribute (ControlTemplate type) is inherited from the Control
-ItemsPanel attribute (ItemsPanelTemplate type) specifies the layout container
-ItemTemplate attribute (DateTemplate type) Template of each Item
<Style TargetType = "Button">
<Setter Property = "OverridesDefaultStyle" Value = "True"/>
<Setter Property = "Template">
<Setter. Value>
<ControlTemplate TargetType = "Button">
<Grid>
<Ellipse Fill = "{TemplateBinding Background}"/>
<ContentPresenter HorizontalAlignment = "Center"
VerticalAlignment = "Center"/>
</Grid>
</ControlTemplate>
</Setter. Value>
</Setter>
</Style>