WPF弹出ZORDER [英] WPF Popup ZOrder

查看:238
本文介绍了WPF弹出ZORDER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的一个WPF弹出,但它在我的桌面上的每一个窗口上方弹窗了,即使我的应用程序最小化。我怎样才能使它留只在它起源的窗口?当我的窗口在其他窗口后面发生同样的事情:在弹出的显示凌驾于所有人之上。

I am using a WPF Popup, but it popups up above every single window on my desktop, even when my application is minimized. How can I make it stay only on the window it originated? The same thing happens when my window is behind other windows: the popup displays above them all.

!一定有什么事情可以做

"There must be something can be done!"

感谢。

推荐答案

我试图来解决这个问题为好,并已发现没有什么好办法。这似乎是它应该工作的方式,你不能覆盖。

I've tried to solve this issue as well, and have found no good solution. This seems to be the way it is supposed to work, and you can't override that.

唯一的解决方案,我想出来的是只使用常规布局面板,提高它的Z-指数,所以它是最高级别控制(这种的模拟弹出)。我发现,这是不行的唯一的一次是当你有过WindowsFormsHosts在屏幕上的WinForms。这些的WinForms总是在更高的Z-指数比任何东西WPF。这时候,你必须使用一个弹出来绕过它。

The only solution I've come up with is to just use a regular layout panel and raise it's Z-Index, so it is the top-level control (this sort of simulates the Popup). The only time I have found that this won't work is when you have WinForms on the screen through WindowsFormsHosts. Those Winforms are always at a higher Z-Index than any of the WPF stuff. That is when you have to use a Popup to get around it.

这篇关于WPF弹出ZORDER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆