WPF: Button Template vs ContentTemplate

22,415

Solution 1

Template defines the appearance of the control. ContentTemplate specifies how the content contained in/displayed by a ContentControl is to be displayed.

Here's a Social.MSDN thread containing an example that shows the difference between the two.

Hope this helps,
Ben

Solution 2

Template's value type is controlTemplate, which defines how control should looks like.

ContentTemplate's value type is dataTemplate, which define the how data should looks like. The similar property is ItemTemplate and CellTemplate.

Share:
22,415
Jiew Meng
Author by

Jiew Meng

Web Developer & Computer Science Student Tools of Trade: PHP, Symfony MVC, Doctrine ORM, HTML, CSS, jQuery/JS Looking at Python/Google App Engine, C#/WPF/Entity Framework I hope to develop usable web applications like Wunderlist, SpringPad in the future

Updated on July 09, 2022

Comments

  • Jiew Meng
    Jiew Meng almost 2 years

    Can I say that usually, in WPF, properties Template contains ContentTemplate? Or else, whats the difference?