开发者

Equivalent of CompositionInialiser.SatisfyImports(this) in WPF4?

开发者 https://www.devze.com 2023-03-20 14:30 出处:网络
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 plu

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号