firstfloorsoftware / mui

Modern UI for WPF
Microsoft Public License
2.59k stars 755 forks source link

MEF step by step #126

Open crisfranco opened 8 years ago

crisfranco commented 8 years ago

Please, could someone tell me how I can use MEF in separate projects?

I have a main project and other projects with pages.

The idea is that, in projects with the pages, whether generated "dlls" that the main project will consume.

In the microsoft tutorial I can do without problems, but the modernUI not.

I tried to follow the guide of the firstfloor but not got success ... actually, I don't understand where I put the MefContentLoader functions and ContentAttribute etc. They go in the modules (dlls) or in the main project.

Would like more clarity, a step-by-step. Can someone help me?

prskr commented 8 years ago

The MefContentLoader and the ContentAttribute are neither in the main project nor in the modules but in a third project. Afterwords you'r referencing the third in project in the main project and all you're module projects. If you don't separate the MefContentLoader and the ContentAttribute you're getting some problems with cyclomatic references.