locked
Start Animation? RRS feed

  • Question

  • I'm getting used to the idea of XAML and using Blend, pretty cool.

    Right, basically, I have a Textbox with text in it. I made that into a canvas and then made a timeline, and at the start, opacity = 0 and in the end, its 100. This works fine in the editor but how can i "start" that animation as soon as the control is loaded?

     

    Saturday, March 15, 2008 11:57 AM

Answers

  • There may be an easier way, but when you create a storyboard (animation), you can access it from codebehind like a property.So, you create an event handler for your control's loaded event, and in there do something like:

    this.MyAnimation.Begin(). 

     

    That should do it. There's quite possibly an easier way, but that should work.

     

     If that answered your question, please mark this response as an answer.

    Monday, March 17, 2008 2:03 AM

All replies

  • There may be an easier way, but when you create a storyboard (animation), you can access it from codebehind like a property.So, you create an event handler for your control's loaded event, and in there do something like:

    this.MyAnimation.Begin(). 

     

    That should do it. There's quite possibly an easier way, but that should work.

     

     If that answered your question, please mark this response as an answer.

    Monday, March 17, 2008 2:03 AM
  • Sorry for the delay and thanks for the reply.

    Can you tell me, where do I play that code? would that be JScript or from Server side (C#) ?

    Saturday, March 22, 2008 6:23 PM
  • That would be serverside C# code.

    Are you comfortable with creating event handlers?

     

    Saturday, March 22, 2008 11:28 PM
  • I should be but if you don't mind, please give an example :)

     

    Sunday, March 23, 2008 6:03 AM