Skip to main content
Top

2009 | Book

Foundation Silverlight 2 Animation

insite
SEARCH

About this book

See the power of Silverlight in action Learn the building blocks of animation in Silverlight 2 Includes over 180 example Silverlight projects Silverlight is a phenomenally powerful animation tool, but few people know how to unlock its potential. Foundation Silverlight 2 Animation gives you the keys to all of that power.

It covers the basics of animation—that is, Silverlight's storyboards and animations, which are used to provide interactivity to Silverlight applications. You'll take an in-depth look at double, point, and color animations. You'll also learn the difference between linear, spline, and discrete keyframes, and how they affect your objects as they move.

But it doesn't stop there. You'll go well beyond those simple timeline-based animations and learn how to create purely code-based animations. You'll use vectors to make objects move and bounce off boundaries and each other. You'll explore particle systems, kinematics, and collisions. You'll also learn how to use trigonometry to animate objects and simulate 3D motion in a 2D environment. The essential trigonometry required to create complex motion is simplified and explained through a series of fascinating and fun examples that can be incorporated into your own applications, games, and experiments.

Whether you're already familiar with Silverlight and you want to learn how to open it up, a Flash developer interested in expanding your skill set, or a web developer looking to take the next step into rich interactive application development, this book will bring you up to speed on Silverlight 2 and show you what it can do. From techniques for creating frame-based animations to learning how to simulate 3D in a 2D environment, there is something here to satisfy anyone's appetite for animation and interactivity.

Table of Contents

Frontmatter

Getting Started

Frontmatter
Chapter 1. What You Need to Know
Abstract
Silverlight is a cross-browser, cross-platform browser plug-in developed by Microsoft to deliver multimedia, graphics, and animation on the Web. Content created for Silverlight looks the same on a PC and a Mac, and supports a wide range of browsers. There is even a Microsoft-supported Linux version, called Moonlight.

Silverlight Animation: The Basics

Frontmatter
Chapter 2. Basic Transforms
Abstract
When we talk about animation in Silverlight, we’re really talking about the different ways we can manipulate the properties of an object within the applications we build. One of the tools available to change the way an object looks relative to the original is called a transform. Basic transforms are used to modify an object’s translation (its location relative to the container in which it resides), rotation, scale, or skewing. Basic transforms are a common aspect of application UI development, often used to animate objects over time (such as panels sliding in and out, and objects growing and shrinking).
Chapter 3. Storyboards and Animations
Abstract
As you have seen, Blend does the heavy lifting when it comes to creating animations and storyboards while you concentrate on manipulating objects on the artboard. In this regard, Blend is a great time-saving tool. However, the default animations produced in Blend may not be ideal in all situations. There are multiple types of animation available to you in Blend/Silverlight, and being aware of the different types will make it easier for you to select the appropriate match for your projects. In this chapter, we will be taking an in-depth look at storyboards and each of the different types of animation provided by Silverlight. To complete the discussion, you will also learn how each type of animation can be written entirely in the code-behind file, with no XAML. Your main take-away should be a deep understanding of the various animation types and how each affects the motion of your objects.
Chapter 4. Animation Techniques
Abstract
In this chapter, we’re going to take a little time and look at some ways to animate objects using the techniques covered already. The projects presented here should help open the door for you a bit when it comes to thinking through the different ways to work with objects that you want to include in your own animations.

Advanced Animation

Frontmatter
Chapter 5. Coordinates in Silverlight
Abstract
Our journey into animating from the code-behind begins with a better look at Silverlight’s angle and coordinate system. You’ve seen a little bit of this in some of the earlier examples, but now that you will be directly manipulating objects, it is important to have a firm understanding of the ideas presented here in order to make objects move the way you want them to.
Chapter 6. Using Trigonometry for Animation
Abstract
The word trigonometry is enough to strike fear into people’s hearts. This is usually the part where everyone regrets having slept through their math classes, but not to worry—you’ve done a bit of trig already. It’s true. In the last chapter when we were working with vectors, I slipped a little bit in. That wasn’t so bad, was it? Good. Now we’re going to take a deeper dive and explore what math can do for us when it comes to animating.
Chapter 7. Simulating 3D in 2D
Abstract
In this chapter, we’re going to apply some of the concepts from Chapter 6 to emulate 3D object rotations. While Silverlight doesn’t yet support true 3D, you can add a little pop to your applications by implementing the concepts we’ll talk about here.
Chapter 8. Collisions
Abstract
So far, you’ve learned how to make objects move in a variety of interesting ways. They are missing one crucial component, however: interaction. In this chapter, we’re going to talk about how to tell when objects have collided, and what to do with them when a collision has occurred.
Chapter 9. Kinematics
Abstract
In this chapter, we’re going to discuss how we can go about implementing basic forward and inverse kinematic chains/systems in Silverlight. Both techniques have been used pretty extensively in 3D animation to create objects with articulated, constrained joints that walk, interact, and so on. The concept is based upon a group (or chain) of objects. Given that chain of objects, kinematics is a method of determining an object’s rotation and position based on the object next to it.
Chapter 10. Particle Systems
Abstract
In this chapter, we’re going to take a look at how to build particle systems in Silverlight. Particle systems are often used to model so-called fuzzy objects—objects that do not have well-defined surfaces, such as smoke, fire, and water. Now, before you get too excited, you should know that we won’t be doing those types of particle systems here. Instead, we’re going to create a base system that you can augment based on other concepts you’ve learned in this book in order to move in that direction.
Chapter 11. Silverlight VR (SLVR) Objects
Abstract
In this chapter, we’ll talk about how to use Silverlight to display virtual reality (VR) objects. Everybody’s seen this type of object—the image loads, and as you use the mouse to drag inside the window, the object rotates with the mouse, allowing a more interactive experience with the object being displayed. You’ll also see something you’re not likely to find in any other book. I’m going to show you how to use Silverlight to travel through time. Yes, really.
Backmatter
Metadata
Title
Foundation Silverlight 2 Animation
Author
Jeff Paries
Copyright Year
2009
Publisher
Apress
Electronic ISBN
978-1-4302-1570-7
Print ISBN
978-1-4302-1569-1
DOI
https://doi.org/10.1007/978-1-4302-1570-7

Premium Partner