Friday, October 26, 2007

timeline does not automatically play. Stop Timeline

Took me a long time to figure this one out!

When you create a new timeline, Blend creates by default an Event trigger which starts the animation when the scene is loaded.

Here is how you can delete it:-open the Triggers palette- select the "Window.Loaded" event; (the bottom area of the palette will show all the actions for the "Window.Loaded" Event trigger)- click on the "-Trigger" button

In a similar way you can add an Event Trigger to start the animation when the button is clicked:- create the button- select the button- click on "+ Event"- select "button" in the first field (when button) and Click in the second field (in the end it will say: When button.Click is raised)- click on the "+" button- select Storyboard1.Begin as the action

You may also start the animation from code if you want: - add an Event in the property inspector OnButtonClick to the button - insert the following code (replace Storyboard1 with the name of your storyboard private void OnButtonClick(object sender, RoutedEventArgs e) { Storyboard storyboard = this.FindResource("Storyboard1") as Storyboard; storyboard.Begin(this); }

No comments:

Subscribe To

Links!

E-Mail Me:

Geek Girl

About

Hi all you geeks!! Its geek girl here! For my job, I am FORCED to learn this crazy scary new program called Expression Blend. Yep.. it is very very very confusing when first learning anything in it. No matter how simple it may seem!!! It will frustrate you til you want to scream and run away...But have NO fear! Geek Girls here to do all the dirty work for you!! I will be posting everything I learn in expression from start to finish (until I am not an expression weakling newbie anymore)!! I will be using very simple non geek language so you can understand how it all works without having to decipher a word of it! So check back every so often and you might just run across something you need to know so you TOO can be on your way to geeky stardom!Wish Me Luck!!