<DataTemplate DataType="{x:Type vm:SalesViewModel}">
<vm:Sales>
</DataTemplate>
Whats the meaing of the above code in wpf resource file?
<DataTemplate DataType="{x:Type vm:SalesViewModel}">
<vm:Sales>
</DataTemplate>
Whats the meaing of the above code in wpf resource file?
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