How to start a storyboard / timeline in a blend 4.0 expression when loading a page

I'm still a little new to developing Silverlight applications in Microsoft Expression for web pages.

I built a storyboard using Expression Blend 4.0. I would like it to run in the browser when the page loads, automatically, but I could not figure it out.

I searched online for answers, but so far the only answers I have found seem to relate to earlier versions of Expression Blend, and the environment is too different for me to understand how to apply them to a Blend 4.0 expression.

I appreciate any help you can provide.

+3
source share
3 answers

Ok, I found the answer to my question.

  • "" ( ).
  • "" .
  • "ControlStroyboardAction".
  • ""
  • " " "ControlStoryboardOption" "play" "StoryBoard" .
+10

, Storyboard.start();

+2

Put this in your code behind (.cs):

public MainPage()
{
    InitializeComponent();

    this.Loaded += new RoutedEventHandler(MainPage_Loaded);
}

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
    Storyboard sb = this.Resources["Name of Animation"] as Storyboard;
    sb.Begin();
}
0
source

All Articles