I am a big proponent of the MVVM template with Silverlight. I am currently connecting the ViewModel to View, updating the ViewModel in the code behind the view, this way:
public partial class SomePage : UserControl { public SomePage() { InitializeComponent();
And then all the binding is processed in the view, and all the logic is processed in the ViewModel, as the template suggests.
However, connecting these devices means that the designer is not working well, and I cannot use the Expression Blend design-time data. I know that there are libraries, such as MVVM Light, that will help get all of this, but I prefer not to contribute the library, as this is “one more thing” to deal with.
Is there a simple template for connecting MVVM in Silverlight while maintaining designer functionality, especially in Blend? I did some Googling, but there are so many legacy articles and so much confusion between WPF and Silverlight and older versions that I find it hard to find to use.
By the way. I am focusing on SL4 with VS2010, if that matters.
source share