Finally Visual Studio 2010 is out and so is the Silverlight 4. I got few complaints that my MVVM demo applications are not working properly for people that have the new Silverlight 4 runtime installed so i updated all the examples so they run properly. Also all solutions files with code are recompiled and checked in final version of VS 2010 so this should run fine now. Expect soon more MVVM goodness on this blog, and until then – just enjoy the spring! 😀
In all my previous MVVM in Silverlight 4 posts i was avoiding to address one painful aspect of the Silverlight: calling WCF Web Services. And it was not without reason. Lets face it, consuming WCF Web Services from your Silverlight application can be pretty hard. I mean hard to do it in a clean way off course. Yes we all know how to create a Silverlight enabled WCF Web Service from Visual Studio but things become messy from that point. First question is how to invoke methods of the web service? Should we use Add Web Service Reference from the Visual Read More
In previous two posts we covered wiring up the Views and ViewModels and Blendability and showing ModalDialogs in MVVM way. Today we will touch another problem that people starting with MVVM very often fail to address properly: Handling the UI Events of the View in the ViewModel while avoiding placing any logic in code behind of the View. So our design goals for this post are: We want to be able to wire-up UI Events to the commands in ViewModel via DataBinding in Xaml without any code behind in the View View should not be aware of the ViewModel’s type Read More
In this post i would like to tackle another problem that is very common in MVVM and yet very rarely done correctly.
I will try to provide simple and platform agnostic way of showing Modal Dialogs in MVVM manner without any code in View (later in the post we will reuse same concept and provide way to show simple message dialogs in the same way).