views:

50

answers:

1

Hello,

I am not good with Silverlight animations. When i use Expression Blend it generates huge amount of code, the classes of which go way above my head. Do i need to remember all these classes or is it fine if i just use tool? I really get tensed when i see such big class names. Please guide me. How do i remember all these class names. Explain me fundamentals how do i get started with animation in silverlight.

Thanks in advance :)

+2  A: 

Silverlight supports time-based animation. That means (in general) all you have to do in order to create animation is tell it what is the beginning value of the property of a specific object you want to animate, what's the property's final value, how much time it will take for the object to get to it's final state, and how to interpolate the property's value.
For example: Let's say you have an Image, and you want it to fade from completely visible to unvisible in one second. The object you're animating is obviously the image. The property you're animating is it's opacity. It's start value is 100%, it's end value is 0%, time is 1 second, and let's say you want it to use linear interpolate - that means Silverlight will caculate what value to give this property for each frame it draws, so for example if it draws 50 frames per second - it will draw the first frame with 100% opacity, the second with 98% opacity, and so on, until it reaches 0% opacity (I may be one-off, don't get me on that (-:). Obviously animation can only be used for continuous values (otherwise interpolation is meaningless).
All of these are what you see in the XAML created for you by blend. Take a look at it, I'm sure you'll understand it better :-). I think if you know what you want- Blend will do it for you (assuming you know how to use it) - here's an ok tutorial- http://www.codeproject.com/KB/silverlight/SilverlightBouncingBall.aspx, I personally used the book- foundation expression blend 3 with silverlight.pdf, which was great, but I'm sure you can also find some good tutorials by googling.
When you'll have to use these animations in code, you'll have no choice other than understanding exactly how it's done, but if you'll start with most simple code examples, work your way up, and be assisted with the automatically generated XAML for further understanding, you should be able to handle this.
Anyhow, I don't thing memorizing "by heart" helps.
HTH. Goodluck

Oren A