Building Silverlight 3 application using MEF

Sep 1, 2009 at 10:00 PM

I've been search the net to find an example of using MEF in a silverlight 3 app, especially to load pages on demand especially a ChildWindow and send messages back to the caller but cannot find any article!!!!

Can someone please point me in the right direction.



Sep 2, 2009 at 7:39 AM

This article demonstrates a way to do it.

I did it in another way by introducing an IWindowRegistry interface and exporting a default implementation as shared part in the root composition container. You could populate the window registry during bootstrap any way you like, for instance by loading some mapping file which maps the window name to a xap file/class name. At runtime the window registry would use MEF to resolve the window class.

Sep 2, 2009 at 11:55 AM

Thanks for your reply.

The article you specify does not show how to bring up a siliverlight 3 childwindow (which fills the browser)and get the DialogResult in the calling page.

Do you have any example of this and also an example of your example



Sep 2, 2009 at 3:09 PM

Ahhh, now I see what you mean, sorry.