最佳答案
TemplateBinding is used for binding to the element properties within the template definition. In your example, you could have written:
<Border Padding="{Binding Padding}" ...>
I could not understand BorderThickness="{TemplateBinding BorderThickness}
.
Here the code:
<ControlTemplate TargetType="{x:Type wpftoolkit:DataGridCell}">
<Border Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
</ControlTemplate>
Also please explain other types of binding.