Tag Archives: animation

Animations in Blend

The addition of the animation engine in Windows Presentation Foundation (WPF) allows designers and developers to animate objects without using third party software. Before getting into an example of how to work with animations, it is important to know the basics.

Animations are time based. After setting a target value the animation interpolates the [...]

Data visualizations

Today I recieved an e-mail to The Best Tools for Visualization.  For the past five years I have worked in a world where there is really only one way to display data, THE GRID.  To be exact, the .NET DataGrid.  This control alone has employed many developers and has allowed them to make a living [...]

Positioning in Silverlight 2

A common mistake in Silverlight is for people to use the Canvas.Left and Canvas.Top property when positioning elements.  In Silverlight 2, there is a push towards a relative positioning model.  This makes the Margin, HorizontalAlignment, and VerticalAlignment very important (for all you CSS people the Margin starts on the Left and goes clockwise).  So, how [...]

Easing animations in Expression Blend

Here is how to add easing to your animation in Expression Blend. IMHO adding easing to animations really makes your product look polished. I have been trying to write an Animation system for Silverlight 2, much like the Tweening libraries for Flash and Javascript. However, when I found this today, there may [...]

Animation engine for Silverlight

Just added Animations for Width and Height.  Check out the code and the example.  For more information here is the initial post.   I will add more documentation after getting a few more animations in the engine.
Known issues:
After the animation of Width, the width property doesn’t get set.  Same with Height.

Reusing a Storyboard

It is possible to reuse a storyboard.  Make sure to stop the storyboard before you set a new target property.  Thanks Tom for pointing this out.
XAML
    <Canvas x:Name=”LayoutRoot” Background=”White”>
<Button Height=”20″ Width=”120″ Canvas.Left=”0″ Canvas.Top=”0″ Content=”Button” x:Name=”btnTest”/>
<Rectangle x:Name=”Fred” Height=”30″ Width=”30″ Fill=”Aquamarine” Canvas.Top=”50″/>
<Rectangle x:Name=”Wilma” Height=”30″ [...]

Animate Silverlight 2 object from 1 line of code

In a previous post about how to create animations dynamically, I showed how to add StoryBoards from C#. I have extracted this logic into a class called SLAnimator. This allows you to do an animation from one line code, and a nice thing about this approach is it still uses the built in [...]

How to dynamically create animations from C# in Silverlight

So you want to create an animation from managed code. To do this, there is quite a bit of code needed. For every animation there needs to be a new StoryBoard, and unfortunately a StoryBoard can not be reused between objects. (Correction: You can reuse a dynamically created StoryBoard. Make sure to [...]

Animating multiple transforms in C# - Silverlight

Yesterday I talked about how to write C# code to animate multiple transforms of an object.  It appears, to my dismay, that at the current time you are unable to animate objects completely in C#.  There is a work around by creating a XAML storyboard and importing into a string using the XAMLReader object.  Here [...]

Animate multiple transforms from C# - WPF

I have been stuck in the world of WPF for a while, hence the lack of posts. Things have calmed down and I am back.
Let’s talk about animating objects in WPF/XAML/C#. Animating multiple transforms in XAML is easy: setup the initial transforms, add a storyboard, set up an event trigger, and go. [...]