This project is read-only.

MEF - Reference Page Source from External DLLs

Mar 12, 2014 at 11:16 AM
Edited Mar 12, 2014 at 11:37 AM
Hi Guys,
First of all, great Work! I really enjoy your Project.
But i have one Question. ;)

Is't possible to reference the Source from a LinkGroup to Page from a external DLL, loaded with MEF?

   <mui:LinkGroup DisplayName="external">
            <mui:Link DisplayName="transfer" Source="/transfer.xaml" />
            <!-- Source should be loaded Page from Assembly -->
I think of an idea to load all additional Pages from DLLs, at the beginning of initialization of the Client, like block moduls.

Thanks in Advance
Mar 12, 2014 at 4:59 PM
Edited Mar 12, 2014 at 5:01 PM
You need to read the MEF Guide.

I've followed it and am doing exactly what you are looking for - using external DLLs to drive the contents of my mui application. The only difference for me is that I am also using Unity for my IoC and using the MEF and Unity integration libraries from the mefcontrib codeplex project.

With everything combined, it's very tight.
Mar 13, 2014 at 1:38 PM
Edited Mar 13, 2014 at 1:49 PM
Yeah and it works fine.

But now i hold a IEnumable with the UserControls and don't know how to add them in my MainWindow.
The Controls are initialized but i need a way to add them from Code Behind.

I'm so stupid...

Found it! It's clearly written in the Documentation...

Sorry for bothering you... :(