将 Silverlight 控件公开给模块

发布于 2024-08-06 16:34:58 字数 108 浏览 2 评论 0原文

我正在使用 Prism 构建我的应用程序,我的 19 个模块需要与另一个模块的控件进行交互。

有什么办法可以暴露控件吗?我真的不想使用事件系统,因为我知道传递给它的数据需要承担太多责任。

I'm using Prism to build my application and 19 of my modules need to interact with an control from another module.

Is there any way to expose a control? I really don't want to use the event system because it would too much of the responsibility on my one know to know about the data being passed to it.

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

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

发布评论

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

评论(2

表情可笑 2024-08-13 16:34:58

如果您不想使用事件聚合器,您还可以通过依赖注入来注册一些东西(即服务,其接口在您的基础结构 dll 中定义),直接与控件交互。

If you do not wish to use the event aggregator, you could also register something (ie a service, whos interface is defined in your infrastructure dll) with dependency injection that interacts with the control directly.

瀞厅☆埖开 2024-08-13 16:34:58

您始终可以创建一个单独的项目来保存每个模块引用的“基础结构”控件。这样他们就可以访问 CommonWindow 等。

You can always create a separate project that holds "Infrastructure" controls that each module references. This way they gain access to say CommonWindow etc..

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