如何创建具有资源的 MEF 兼容组件?

发布于 2024-11-05 13:41:40 字数 291 浏览 11 评论 0原文

这看起来是一个很简单的要求,但我却在撞墙!

我有一个现有的 SL4 应用程序,我正在尝试使用 MEF 将其添加到模块中。我已经创建了加载架构,并且可以从引用的 XAP 文件加载页面。

我想要拥有资源,在本例中为 ViewModelLocator,在与我在 XAP 中加载的资源字典相关联中进行描述。我通过导出 ResourceDictionary 并在加载页面之前导入它来实现此目的,并且工作正常。

但是,这并没有为我放入资源字典中的任何资源提供设计时支持。如何获得这些资源的可混合性/设计时支持?

谢谢

This seems like such a simple requirement but I'm hitting my head against a wall!

I've got an existing SL4 application, which I'm trying to add in modules using MEF. I've created my loading architecture and can load the page from my referenced XAP file.

I want to have resources, in this case the ViewModelLocator, described within a resource dictionary associated with my loaded in XAP. I have achieved this by exporting the ResourceDictionary and importing it before loading the page and this is working correctly.

However, this does not give me design time support for any resources I place into the resource dictionary. How do I get blendability/design time support for these resources?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文