是否有可能使 WPF 无模式视图成为模式视图?
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您正在使用股票交易者参考实现、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.