How to Develop MVVM Silverlight applications with Prism

24 באוקטובר 2010

I’ve got some criticism from Alex Golesh in a comment on one of my latest Posts (Managing Silverlight resources contained in external assemblies), First I would like to thank him for taking his time and writing this comment, I would like to reply him with this post. First let’s see Alex’s Comment: I have to comment it, because the code lead to bad practice... First, it heavily assumes you have all you assemblies in single XAP package - which is a bad practice for "heavy" Silverlight applications and especially real MVVM...

Open-Generics Support in MEF– Building a simple sample

22 באוקטובר 2010

A year ago, A controversy arisen in the community when it was discovered that MEF is not going to support Open-Generics out of the box. (Here, Here and finally Here) For those of you who don’t know what is Open-Generics. Consider the following scenario with Unity (which do support Open-Generics): internal class UnityRunner {     IUnityContainer container = new UnityContainer();     public UnityRunner()     {         container.RegisterType(typeof (IRepository<>), typeof (Repository<>));         Repository = container.Resolve<IRepository<Customer>>();...

Porting Windows Phone 7’s Panorama Control to Silverlight 4

21 באוקטובר 2010

One of the first things that really caught my eyes in WP7 is the nice looking Panorama control. You may checkout its functionality here: Windows Phone 7 Panorama Control display. I was rather disappointed that this control is available out-of-the-box for WP7 only. But let’s not let that small fact break our spirit! I’ve downloaded the soon to be deprecated Panorama and Pivot controls code from this codeplex site : (and this is where I must insert a big “Thank” for Stephane for his great work). While most of the Silverlight...

Managing Silverlight resources contained in external assemblies

19 באוקטובר 2010

A year ago, I’ve written a post about Managing WPF resources contained in external assemblies. I am using this pattern in every Prism application I’m developing, the main reason for this is  that I like having each module responsible for his own resources, especially it contains DataTemplates which couple Views to ViewModels. In each of my module entry classes (which inherit from IModule) I usually add a method which is used on the Initialize phase. The problem is that the code that has being used by WPF is very different from the code...