Any way to make WPF Adorner ignore the mouse?

Is there a way to make WPF adoreter ignore the mouse entirely, so that the UIElement behind the adorner still receives mouse events, as if the adorner did not exist?

+4
source share
2 answers

Set the IsHitTestVisible Adorner to false

+11
source

If you are using the tunnel version of mouse events rather than bubble events (i.e. PreviewMouseDown instead of MouseDown ), you will first get mouse events from UIElement and be able to stop them from reaching adorner by setting e.Handled to true.

0
source

Source: https://habr.com/ru/post/1303578/


All Articles