MouseLeftButtonUpEvent & Bubbling in Canvas
Posted
by
Maxim
on Stack Overflow
See other posts from Stack Overflow
or by Maxim
Published on 2010-12-30T06:40:50Z
Indexed on
2010/12/31
1:53 UTC
Read the original article
Hit count: 464
Hi guys,
I think I'm going crazy...
I have Canvas with event handlers for MouseMove & MouseLeftButtonUp. However MouseLeftButtonUp is not being fired when it happens with cursor over TextBlock that is inside canvas. (it fires just fine when I release mouse button in empty space of the canvas)
I tried attaching handler via AddHandler and using regular += syntax, nothing seems to work. I tried using Canvas.CaptureMouse() but it doesnt seem to work either (CaptureMouse returns true btw).
MouseLeftButtonUp just doesnt want to propagate to it's parent when it happens over TextBlock (or any other element with IsHitTestVisible = true) inside Canvas.
Please help.
© Stack Overflow or respective owner