In MVVM are DataTemplates considered Views as UserControls are Views?

Posted by Edward Tanguay on Stack Overflow See other posts from Stack Overflow or by Edward Tanguay
Published on 2009-06-19T07:58:21Z Indexed on 2010/05/18 15:00 UTC
Read the original article Hit count: 254

Filed under:
|
|

In MVVM, every View has a ViewModel. A View I understand to be a Window, Page or UserControl to which you can attach a ViewModel from which the view gets its data.

But a DataTemplate can also render a ViewModel's data.

So I understand a DataTemplate to be another "View", but there seem to be differences, e.g. Windows, Pages, and UserControls can define their own .dlls, one type is bound with DataContect the other through attaching a template so that Windows, Pages, UserControls can can be attached to ViewModels dynamically by a ServiceLocator/Container, etc.

How else are DataTemplates different than Windows/Pages/UserControls when it comes to rendering a ViewModel's data on the UI? And are there other types of "Views" other than these four?

© Stack Overflow or respective owner

Related posts about mvvm

Related posts about DataTemplates