Click here to Skip to main content
15,666,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys and girls, I have the following code

<Button Command="{Binding ResetAll}"  Style="{StaticResource GlassButtonBlue}"  Width="65" Height="65" Canvas.Left="347">
                     <Image Source="/MainHub;component/Images/Update.png" IsHitTestVisible="False"/>
                     <EventTrigger RoutedEvent="LostMouseCapture">
                         <BeginStoryboard Storyboard="{StaticResource Reverse_ClickTwice}"/>

which just moves some buttons around on my screen and hides the current one. However, the command of the current button does not always fire. Sometimes the animation happens, but neither a click event or a command is fired when the button is clicked. Can anyone tell me why this would happen? I've been told it could be because of the order of events that fire but i'm not sure.

Updated 26-Mar-13 20:05pm

1 solution

Found it ! :) changed the event of the trigger to '
' so that the command fires first and then the storyboard executes.

   <EventTrigger RoutedEvent="LostMouseCapture">
      <BeginStoryboard Storyboard="{StaticResource SingleClick}"/>                          
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900