Using an event handler in a view blocks actions

Topics: Actions & Coroutines
May 31, 2011 at 3:13 PM

Hello all,

I have this XAML:

<Canvas Background="Yellow" Width="1400" Height="750" x:Name="BackgroundCanvas" RenderTransformOrigin="0.5,0.5" MouseMove="CanvasMouseMove">
	<Path Micro:Message.Attach="[Event MouseDown] = [Action FieldMouseDown($eventArgs, $source)]" Data=""/>
	<Path Micro:Message.Attach="[Event MouseDown] = [Action FieldMouseDown($eventArgs, $source)]" Data=""/>

When I click on a Path, the FieldMouseDown action is not executed.

If I remove the MouseMove event subscription, it works.

How can I fix that?

Thanks in advance

May 31, 2011 at 3:24 PM

Just to make things clear, the event subscription concerns MouseMove whereas the action concerns MouseDown, so there is no conflicts.

As a further note, I tried with PreviewMouseMove and MouseMove too.

May 31, 2011 at 3:47 PM

Please create an issue and attach a working solution that reproduces the problem. A release is pending, so if you want it fixed for v1.1 you need to get it to me....very quickly.

May 31, 2011 at 4:10 PM

I've just found that there is no problem with CM :)

In the MouseMove, I move an ellipse on top of the Canvas, and it disallow the Canvas to receive the MouseDown event as it is on top of it.

Sorry for the inconvenience :)

May 31, 2011 at 5:13 PM

No problem :) It sounded strange...and I have to admit, I wasn't looking forward to tracking it down :) Glad you got it worked out.