Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是一名 Silverlight 程序员,正在尝试 WPF4。在 Silverlight 4 中使用 MEF 时,我们编写CompositionInialiser.SatisfyImports(this)了允许 MEF 发现部件并将其插入的代码。WPF 4 中这条线的等价物是什么?
CompositionInialiser.SatisfyImports(this)
在将它与 WPF 一起使用时,此静态方法在 MEF 中不可用。
有,但是有点绕。
组合.初始化.Desktop.zip
看到这个帖子:
http://rickrat.wordpress.com/2011/01/24/using-mef-to-link-view-model-locator-and-load-assembly-uis-dynamically/