鼠标事件从WPF中的MessageBox流到父窗口 [英] Mouse Events flow through to Parent Window from MessageBox in WPF

查看:105
本文介绍了鼠标事件从WPF中的MessageBox流到父窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WPF表单,其中包含FlowDocumentScrollViewer,其文本包含超链接.在代码中,有时我需要调出一个MessageBox,但仍然希望能够用鼠标悬停在那些超链接上.

I''ve got a WPF form containing a FlowDocumentScrollViewer with text containing hyperlinks. In code, sometimes I need to bring up a MessageBox, but still want to be able to hover over those hyperlinks with the mouse.

How can I get my parent window to respond to mouse movements while the MessageBox is still the active window?

推荐答案

您必须使消息框处于无模式状态,但仍保持打开状态顶部.

这可能意味着创建自己的消息框类.
You have to make the messagebox modeless, but still stay on top.

This might mean creating your own messagebox class.


这篇关于鼠标事件从WPF中的MessageBox流到父窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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