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

WpfMouseevent

Wpf Problem Overview


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

Wpf Solutions


Solution 1 - Wpf

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

Solution 2 - Wpf

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJordanView Question on Stackoverflow
Solution 1 - WpfRachelView Answer on Stackoverflow
Solution 2 - WpfGeoffreyView Answer on Stackoverflow