Jordan
Jordan

Reputation: 9901

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

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

Upvotes: 60

Views: 20308

Answers (2)

Rachel
Rachel

Reputation: 132548

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

Upvotes: 120

Geoffrey
Geoffrey

Reputation: 976

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.

Upvotes: 2

Related Questions