没有 Prism 的 WPF UI 组合

发布于 2024-09-01 23:56:07 字数 51 浏览 2 评论 0原文

对于 UI 组合(区域管理等),是否有 Prism 的替代方案?

谢谢。

Are there any alternatives to Prism for UI composition (region management etc.)?

Thank you.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽你眉间 2024-09-08 23:56:07

方法有很多种,但目前最流行的方法是 MEF。本系列文章是关于 Silverlight UI 组合的,但技术本质上是相同的(除了打包和部署之外):
http://codebetter.com/glennblock/category/hellomef/

您唯一赢得的东西无法完全使用 MEF 的是 Prism 中称为“EventAggregator”的 Pub/Sub 通信技术,但这可以通过使用 EventAggregator 本身轻松替代(它是独立的......您不必采用所有 Prism 来使用就是这样),或者您可以使用事件代理的另一种实现,例如 MVVM Foundation 中的 Messenger (http://mvvmfoundation.codeplex。 com)。

还有不少人混合使用 MEF 和 Prism,因此您也可以检查一下。

There are a few ways, but the one that is all the rage these days is MEF. This series of posts is about Silverlight UI composition, but the techniques are essentially the same (aside from packaging and deployment):
http://codebetter.com/glennblock/category/hellomef/

The only thing you won't get by using exclusively MEF is the Pub/Sub communication technology in Prism called "EventAggregator", but this can be easily substituted by using EventAggregator itself (it is standalone... you don't have to adopt all of Prism to use just that) or you can use another implementation of event brokering, like the Messenger in MVVM Foundation (http://mvvmfoundation.codeplex.com).

There are also quite a few people using a mix of MEF and Prism, so you might check that out as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文