为什么 Silverlight 不包含 Messenger 组件?
为什么 Silverlight 不包含 Messenger 组件? Silverlight 教程建议使用 MVVM,但 Silverlight 本身默认没有 MVVM 应用程序所需的 Messenger 类。如果您想使用 Messenger,则必须下载 MVVM Light。它会包含在 Silverlight 5 中吗?
Why Silverlight doesnt include Messenger component? Silverlight tutorials advise using MVVM, but Silverlight itself doesnt have Messenger class by default, which is needed for MVVM apps. You have to download MVVM Light if you want to use Messenger. Will it be included in Silverlight 5?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WPF 中也没有现成的 Messenger 类,您需要下载一些提供此功能的 MVVM 工具包(MVVM Light、EventAggregator 下的 Prism)。 Microsoft 不包含这些组件,因为它们并不像 BCL 中需要的那么基本,并且在 BCL 之外提供它们(现在我指的是 Prism,我认为它最接近“官方”MVVM 套件)使 Microsoft 在更新这些组件时具有更大的灵活性。
The Messenger class is not present out of box in WPF either, you will need to download some MVVM Toolkit (MVVM Light, Prism under EventAggregator) which provide this functionality. Microsoft does not include these components, because they are not so basic as they would need to be in the BCL and providing them outside the BCL (now I mean Prism, which I consider to be the closest to an "official" MVVM kit) it gives Microsoft more flexibility in updating these components.