I have created several animations (storyboards) on different pages using Expression Blend.
One case i am running in is the login page where if the user fails to enter the correct password a messagebox will show statng incorrect password, however the animation will play eventhough the password was incorrect. This is happening because in expression blend i have added a behavior on the button upon being clicked to play the animations, so how can i apply conditions also to that button?
My question is how can i from my c# code using if statements to prevent the playback of the animation if the password entered is incorrect?
Everything is working fine except the animation part where i just want to be able to control it from my c# code.
you want to Access the storyboard action in your code, and tell it to Stop.
Storyboard animation
that should be a good start for you to learn the coding side of the storyboard Class.
its a really good feature to know.