This project has moved. For the latest updates, please go here.


Apr 24, 2011 at 4:00 PM


I am having a little difficulty using the "IMessageService" service i see in the samples, it seems to break when I put it in a components constructor?  Is there some initialization code for it?



Apr 29, 2011 at 6:06 PM

Hi Marc

The examples are using MEF as IoC Container. MEF is responsible to create the System.Waf.Presentation.Services.MessageService implementation and inject this object into the components constructor.

MEF needs some initialization code which can be found in the App.xaml.cs class of the sample applications. Furthermore, the component needs the [Export] attribute applied and the constructor needs the [ImportingConstructor] attribute. Last but not least the component itself must be injected in another component or it can be dynamically created via the CompositeContainer.GetExportedValue<T> method.

Best Regards,