是否有可能使 WPF 无模式视图成为模式视图?

发布于 2024-10-02 01:54:48 字数 202 浏览 1 评论 0原文

我正在使用 Prism 弹出区域,并且弹出窗口是无模式的。当我尝试更改 Prism 示例代码以用 .ShowDialog() 命令替换 .Show() 时,代码变得不稳定。所以,我需要保持当前代码完整,并想出一个解决方法:将无模式模式更改为模式模式。

我不知道该怎么做和/或这是否可能。如果您知道如何操作,请分享。谢谢你!

I'm using Prism pop-up region and the popup is modaless. When I tried to change Prism sample codes to replace .Show() by .ShowDialog() command, the codes become unstable. So, I need to keep the current codes intact and think of a work-around: change to modaless mode to be modal mode.

I don't know how to do that and/or if that is possible or not. Please share if you know how to. Thank you!

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

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

发布评论

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

评论(1

爱冒险 2024-10-09 01:54:48

如果您正在使用股票交易者参考实现、RegionPopupBehavior 和 DialogActivationBehavior,那么可以。您只需将 DialogActivation 行为方法的PrepareContentDialog 方法从Show() 更改为ShowDialog()。

参考实现示例不是很健壮,我在使用示例代码创建更健壮的弹出窗口时遇到了问题。然而,一旦你调整了行为,你就可以让它正常工作。

如果您提供有关您的具体问题的更多详细信息,我也许可以提供更多帮助。

If you are using the Stock Trader Reference Implementation and the RegionPopupBehavior and the DialogActivationBehavior then yes you can. You should only have to change the PrepareContentDialog method of the DialogActivation behavior method from Show() to ShowDialog().

The reference implementation example is not very robust, and I ran into problems creating a more robust popup with the sample code. However, once you tweak the behaviors, you can get it working well.

If you provide more details about your specific problem, I may be able to provide more help.

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