I've got a simple viewer application i've made to view some math stuff (involving points and lines, etc.). I'm rendering an array of points, but i'd like to see how they're ordered by animating them in one at a time. I tried the godawful Thread.Sleep hack, but it doesn't work at all. I've seen some tutorials on how to fadeIn things, but not how to animate in an array of elements with a time gap between them.
Asked
Active
Viewed 156 times
1 Answers
2
Provided that each of your point is rendered with a SolidColorBrush of its own, you might animate the Color property of each point's brush with a ColorAnimation and specify the BeginTime property to be different for all animations.
The same approach would work for animating a point's opacity, provided that it has an Opacity of its own (it's either a UIElement
or a DrawingGroup
).
In case you do not want to have a lot of animations running at the same time, you may use an animation for the first point and attach a Completed event handler, which starts the animation on the next point.

Clemens
- 123,504
- 12
- 155
- 268