View Discovery using MEF-Prism

Topics: Prism v4 - WPF 4
Feb 17, 2011 at 2:50 AM

Hi,

Can anyone please share a sample hello world snippet for View Discovery using MEF in Prism.

Thanks in advance.

Regards,

Indro

Feb 17, 2011 at 4:38 PM

Hi Indro,

You might find the Exercise 2 in the MEF Hands-On Lab of the Prism Training Kit useful to learn more about how to use View Discovery with MEF.

Inside Exercise 2's end solution, in the Infrastructure Project you will find the ViewExportAttribute which is used to decorate views that you want to be registered on a specific region (View Discovery Approach). Take into account even it is a Silverlight Project, it could be easily ported to a WPF application.

Additionally, you can read the following links of MSDN Prism Documentation:

Also, you can check the Stock Trader Reference Implementation for an example of the usage of the aforementioned attribute in the context of a complex solution.

I hope you find this information useful.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

 

Feb 18, 2011 at 3:25 AM

Thanks Mig..this just what doctor ordered:)

Thanks,

Indro