Dear SO,
I'm having some issues with Silverlight 4/ MEF. I have a basic framework setup with a Silverlight Navigation app at the core utilizing MVVM where i can.
Image link to the diagram for clarification(not including all the VM classes)
The main app (Desu) contains some pages and controls that export en import nicely. I dynamicly load controls from Desu.Controls(like an imageviewer which i identify with the IImageViewer interface) and some pages from Desu.Pages with MEF. Which is super duper awesome by the way.
I want to be able to inlcude a control from Desu.Controls in Desu.Pages. I have set this up with a Property in the ViewModel and a ContentControl in the View. I import the control in the vieuwmodel based on the contracts(IImageViewer) but this never gets set (or imported).
I have tried calling satisfyimports on the main page(even though i know this just works once :/) and have tried different approaches to load the controls. Without any result.
So does anyone know who to do this?