views:

24

answers:

1
<DataTemplate DataType="{x:Type vm:SalesViewModel}">
     <vm:Sales>
</DataTemplate>

Whats the meaing of the above code in wpf resource file?

+2  A: 

A DataTemplate associates a visual tree to a model object. This code means that when an instance of SalesViewModel is set as the content of a ContentControl (or an item in an ItemsControl), it will be rendered using a Sales control

Thomas Levesque