Silverlight MessageBox.Show 在BackgroundWorker 中阻止WCF 服务调用

发布于 2024-07-14 11:21:30 字数 261 浏览 3 评论 0原文

当从 Silverlight 显示 MessageBox 时,对在 BackgroundWorker 中执行的 WCF 服务的任何调用都会被阻止。 OpenFileDialog.ShowDialog 允许这些调用通过。 MessageBox 期间浏览器 (IE7) 是否阻止网络访问?

我们可以创建自己的模式窗口,但这会导致开发人员代码发生更改,因为它必须是异步的。 (显示自定义“MessageBox”时开发人员代码不会停止)

有什么想法可以解决这个问题吗?

When a MessageBox is being displayed from Silverlight, any calls to a WCF service being executed in a BackgroundWorker are blocked. The OpenFileDialog.ShowDialog allows these calls to go through. Is the browser (IE7) blocking network access during a MessageBox?

We can create our own modal window, but this causes developer code to change as it must be asynchronous. (developer code does not stop while custom "MessageBox" is displayed)

Any ideas how to work around this?

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

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

发布评论

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

评论(1

咽泪装欢 2024-07-21 11:21:30

您可以设计应用程序以避免使用模态消息框吗? 也许使用弹出窗口 - 您可以通过在网格中覆盖整个应用程序并强制键盘导航在弹出窗口中循环来使它们充当模式对话框。

有关所有详细信息,请参阅 Shawn Wildermuth 的页面

Can you design your application in such a way as to avoid the use of a modal messagebox? Perhaps use a Popup - you can make these act as a modal dialog by covering the entire app in a grid and forcing keyboard navigation to cycle within the popup.

See Shawn Wildermuth's page for all the details.

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