9

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

Jiew Meng
  • 84,767
  • 185
  • 495
  • 805

3 Answers3

21

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

Ben Gribaudo
  • 5,057
  • 1
  • 40
  • 75
3

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.

肉肉Linda
  • 568
  • 1
  • 6
  • 13
-2

just have a look at this

http://social.msdn.microsoft.com/Forums/en/wpf/thread/ba37a337-8d62-4343-9155-0a5093467649

Kishore Kumar
  • 21,449
  • 13
  • 81
  • 113