Reputation: 1616
Is there any way to make WPF adorner ignore mouse entirely so that the UIElement behind the adorner still gets mouse events as if the adorner does not exist?
Upvotes: 4
Views: 2375
Reputation: 292555
Set the IsHitTestVisible
property of the Adorner
to false
Upvotes: 11
Reputation: 15247
If you use the tunneling version of the mouse events rather than the bubbling events (i.e., PreviewMouseDown
instead of MouseDown
), you will receive the mouse events from the UIElement
first, and be able to stop them from reaching the adorner by setting e.Handled
to true.
Upvotes: 1