title: How to provide XAML resources from MEF components
body: <p>I have an import MEF component which is dynamically loaded when the import wizard opens. As soon as the user selects the type of import she wants to process, the control over the import wizard dialog is passed to the chosen import component.
  Of course, import components need to supply resources to the wizard dialog (e. g. <code>DataTemplate</code>s). At the moment this is implemented via <code>DataTemplateSelector</code>s which are provided by the import components. They access a local <code>ResourceDictionary</code> of the import component's assembly.</p>
  
  <p>But as you can imagine, this is tedious: I have to add code for every <code>DataTemplate</code> to provide, WPF does not automatically use the right <code>DataTemplate</code> by the type of the <code>ViewModel</code> being displayed.</p>
  
  <p>Has anybody solved this problem before? How do you guys out there provide resources in a plug-in environment?</p>
  
  <p>Thank you for any help in advance.</p>
  
  <p>Best regards</p>