Is there a way to make controls transparent to mouse events in WPF?

后端 未结 2 1654
悲&欢浪女
悲&欢浪女 2021-02-04 23:30

Is there a way that I can let mouse events pass through to controls behind?

相关标签:
2条回答
  • 2021-02-05 00:14

    I usually solve these kind of issues by adding handlers of child controls to the parent at construction. This way the 'click'-event for example activates a method that raises the 'click'-event of the parent.

    0 讨论(0)
  • 2021-02-05 00:15

    Sure, just set IsHitTestVisible="False" on the control. Mouse events will pass through it.

    0 讨论(0)
提交回复
热议问题