I am a Silverlight programmer trying my hands at WPF4. In Silverlight 4 while using MEF we write CompositionInialiser.SatisfyImports(this)
which allows the MEF 开发者_运维技巧to discover parts and plug them in. What is the equivalent of this line in WPF 4?
This static method is not available in MEF while using it with WPF.
There is, but it's kinda convoluted.
Composition.Initialization.Desktop.zip
See this post:
http://rickrat.wordpress.com/2011/01/24/using-mef-to-link-view-model-locator-and-load-assembly-uis-dynamically/
精彩评论