Silverlight MVVM conversion from WPF
Posted
by IrishJoker
on Stack Overflow
See other posts from Stack Overflow
or by IrishJoker
Published on 2010-05-13T11:15:51Z
Indexed on
2010/05/13
11:34 UTC
Read the original article
Hit count: 560
Silverlight
|mvvm
I was reading this article - http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
And I came across this piece of code in the WPF Demo application that came with the article.
This template applies a CustomerView to an instance of the CustomerViewModel class shown in the main window.
<DataTemplate DataType="{x:Type vm:CustomerViewModel}">
<vw:CustomerView />
</DataTemplate>
I substituted the angle brackets for square brackets - not sure how to post them.
The code is in the MainWindowResourses.xaml and the code starts on line 19.
Anyone know how I can do this in Silverlight ?? We don't have the DataType and I need to be able to tell the app that this View is associated with this ViewModel - so I can create a tab control with different view like the demo app.
Cheers,
EC
© Stack Overflow or respective owner