Sako73
Sako73

Reputation: 10147

Is there a way to trap the MouseLeftButtonDown event on a transparent background in WPF?

I build a WPF UserControl. This control has a transparent background. I want to trap the MouseLeftButtonDown event, even when this event happens on the transparent background. If I change the background to "White", or another color, the event is trapped as expected.

Is there a way to tell the control to listen for the event, even if it happens over a transparent area?

Thanks.

Upvotes: 2

Views: 392

Answers (1)

Emond
Emond

Reputation: 50712

There is a difference in specifying no Background and specifying a transparent background: {x:Null} vs. Transparent?

Upvotes: 3

Related Questions