Do MEF support WPF elements composition?Hi,<br/> <br/> <br/> I discovered MEF one hour ago and it seems that this Framework interest me a lot to program a plugin based application. <br/> However, I have some questions about it and I will be really glad if someone, who knows MEF, give me some answers.<br/> <br/> 1- Do each Plugin or Part can be configurable independently ?  I mean, is it possible to associate an &quot;App.Config&quot; file for each Plugin so that each one can be configurable independently ?<br/> 2- Do MEF allow WPF controls composition ? Suppose I have a plugin A and a plugin B. In each one I have a WPF component, a Panel in the plugin A and a Button in plugin B. I'd like to know if my Button in the plugin B can be added to my Panel in plugin A. In fact, I'd like to reproduce the Composite Application Library behavior with MEF. Is that possible?<br/> <br/> Thanks<br/> <br/> Riana© 2009 Microsoft Corporation. All rights reserved.Sun, 25 Oct 2009 15:28:38 Z47fa876c-8693-4355-93e4-18fec5ce8efahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#47fa876c-8693-4355-93e4-18fec5ce8efahttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#47fa876c-8693-4355-93e4-18fec5ce8efaRiana Rambonimananahttp://social.msdn.microsoft.com/Profile/en-US/?user=Riana%20RambonimananaDo MEF support WPF elements composition?Hi,<br/> <br/> <br/> I discovered MEF one hour ago and it seems that this Framework interest me a lot to program a plugin based application. <br/> However, I have some questions about it and I will be really glad if someone, who knows MEF, give me some answers.<br/> <br/> 1- Do each Plugin or Part can be configurable independently ?  I mean, is it possible to associate an &quot;App.Config&quot; file for each Plugin so that each one can be configurable independently ?<br/> 2- Do MEF allow WPF controls composition ? Suppose I have a plugin A and a plugin B. In each one I have a WPF component, a Panel in the plugin A and a Button in plugin B. I'd like to know if my Button in the plugin B can be added to my Panel in plugin A. In fact, I'd like to reproduce the Composite Application Library behavior with MEF. Is that possible?<br/> <br/> Thanks<br/> <br/> RianaThu, 11 Jun 2009 21:02:48 Z2009-06-11T21:02:48Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#b9165547-edda-46da-b13c-57d0b0df0dfbhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#b9165547-edda-46da-b13c-57d0b0df0dfbRiana Rambonimananahttp://social.msdn.microsoft.com/Profile/en-US/?user=Riana%20RambonimananaDo MEF support WPF elements composition?After taking a look more closely, it seems that my question number 2 is satisfiable and, the sample codes use it. It is totally possible to declare Shell container and use MEF to insert Chidren to the shell container.<br/> <br/> About my question number 1, it seems that it is not possible unfortunately ...<br/> The all application is always executed in the default app domain so,  only one configuration file can be used for all classes and components of the application.<br/> It seems that it is not possible to have some kind of configurable  &quot;Modules&quot;. I mean by &quot;Modules&quot; an aggregation of classes or assemblys that are logically tied together. Each Module should be configurable with one configuration file,  and can interact with other Modules of the application. Also, a module should be dynamically loadable and unloadable...<br/> <br/> Imagine for example an application which can be composed by a  'Communication Module' that should be configurable with an App.config file because it use WCF client, and a &quot;UI Module&quot; that should also have its own configuration file. It seems that this scenario is not possible to realize using MEF ...<br/> <br/> Please tell me if I am right or wrong.<br/> <br/> Regards,<br/> <br/> Riana<br/> <br/> <br/> <br/> <br/>Thu, 11 Jun 2009 21:51:39 Z2009-06-11T21:51:39Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#a7b3f9c2-d39f-42e9-8078-aa7cf786fc01http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#a7b3f9c2-d39f-42e9-8078-aa7cf786fc01cautionsignhttp://social.msdn.microsoft.com/Profile/en-US/?user=cautionsignDo MEF support WPF elements composition?I think you might need MAF (System.Addin namespace) rather than MEF in your situation; MAF load the assembly or add-ins in different App-Domain and you can let your &quot;Modules&quot; have different configuration file. <br/><br/><br/>Regards,<br/>cautionsign.<hr class="sig">+_cautionsign+_Tue, 22 Sep 2009 14:42:11 Z2009-09-22T14:42:11Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#cc513d65-15a0-480b-98f4-461f6b114806http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/47fa876c-8693-4355-93e4-18fec5ce8efa#cc513d65-15a0-480b-98f4-461f6b114806Riana Rambonimananahttp://social.msdn.microsoft.com/Profile/en-US/?user=Riana%20RambonimananaDo MEF support WPF elements composition?Effectively, MAF is suitable for plugin-based application and with MAF, we can load and unload modules dynamically.<br/> However, composing WPF components or other UI elements, using MAF is a little bit tedious. There is also a real performance problem when for example trying to display a component from Plugin A into the main app.<br/> <br/> Actually, in the world of modular architecture framework, it seems that Microsoft do not have yet a product which can be a real alternative to java frameworks like OSGi implementations (Equinox, Felix etc..).<br/> <br/> RianaSun, 25 Oct 2009 15:28:38 Z2009-10-25T15:28:38Z