Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Label MouseClick?

$
0
0

Hi,

I'm taking another stab at WPF. I would like to get the equivalent behavior of a Click event from a Label. The only way I can currently see how to achieve that (kind of) is to register for both MouseDown and MouseUp, storing information about the MouseDown event and checking it on MouseUp, but that will fail in a scenario like this:

1. MouseDown on label

2. move mouse outside and release button

3. MouseDown outside

4. move mouse inside label and release (= false positive)

 

Either way, having to handle both MouseDown and MouseUp for something as simple as a MouseClick seems strange.

 

What to do? Thanks.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>