Attached actions not working with left mouse button

Feb 7, 2011 at 8:42 PM

I'm trying to do what I think is a simple button with discrete events for MouseDown and MouseUp:

<Button x:Name="PowerButton" Content="Power" Height="23"  Width="75" 
  cal:Message.Attach="[Event MouseDown] = [Action PowerDown]; [Event MouseUp] = [Action PowerUp]" />
But PowerDown/PowerUp only invokes when using the right or middle mouse buttons. Is something else preventing CM from seeing the left mouse button events?
Feb 7, 2011 at 9:07 PM

It all has to do with the events. Under the covers this uses an System.Windows.Interactivity.EventTrigger. It wouldn't have anything to do with CM I don't think.

Feb 7, 2011 at 9:34 PM

Thanks. Once I stopped worrying about the CM part of the equation I realized I need to use Preview* events on a button since it stops bubbling for individual left mouse events. Works great now.