WPF MouseDown event not firing everywhere in a control

杀马特。学长 韩版系。学妹 提交于 2019-11-29 03:07:54
HCL
<StackPanel Background="Transparent" ...

or

<Border Background="Transparent" ...

should do the trick...

This makes the grid transparent, however visible for mouse-clicks.

Look here form more Information.

There are some other cirmumstances, where you have to use the PreviewXXX-Event, this is when a child element "swallows" the event away, but in your case, the above shpould what you're looking for.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!