应用程序中的多个 WPF 弹出窗口
我正在开发 WPF 应用程序,但遇到弹出窗口问题。我理解弹出窗口的 zindex 高于其他所有内容的问题。我遇到的问题是我的应用程序可能会出现一次打开多个弹出窗口的情况。发生这种情况时,最后打开的弹出窗口始终位于另一个弹出窗口的顶部。我真的很希望这个操作是,最后单击的弹出窗口位于顶部。我在弹出窗口上有一个拇指,因此可以拖动它,并且我有一个控制拖动的行为。我注意到我可以打电话 在thumb_drag事件中popup.isopen = false,然后popup.isopen = true,单击的弹出窗口显示在顶部,但当弹出窗口关闭和打开时,它会产生不良的闪烁。我已经研究了 Reflector 并尝试了几件事(IsOpenProperty 上的 coecevalue、InvalidateVisual 等),但没有运气。有没有人遇到过同样的问题并且能够解决它?
谢谢
I'm developing a WPF app and I'm having an issue with popups. I understand the issue that a popup's zindex is higher than everything else. The problem I'm having is my app can have situations that there are more than one popups open at a time. When this happens, the last popup that opens is always on top of the other. I would really like the action to be, whichever popup gets clicked last is on top. I have a thumb on the popup so it can be dragged and I have a behaviour to control the dragging. I have noticed that I can call
popup.isopen = false and then popup.isopen = true in the thumb_drag event and the clicked popup shows on top, but it produces an undesirable flash when the popup closes and opens. I've dug through reflector and tried several thing (coecevalue on the IsOpenProperty, InvalidateVisual, etc.) and am having no luck. Has anyone had this same problem and been able to fix it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许这可以帮助?它是一个不是最顶层的弹出窗口。不确定它是否适用于您的场景,但可能值得一试
http://chriscavanagh.wordpress.com/2008/08/13/non-topmost-wpf-popup/
Maybe this can help? Its a Popup that is not topmost. Not sure if it will work in your scenario though but it may be worth a try
http://chriscavanagh.wordpress.com/2008/08/13/non-topmost-wpf-popup/