views:

10

answers:

2

i am moving from AS3 and Java to Expression Blend/WPF, but cant seem to figure out how to replicate EnterFrame event in C#, is there a update() or frameUpdate() function.

A: 

CompositionTarget.Rendering is called every frame. You could also use timer such as DispatcherTimer.

Kris
+1  A: 

this should be helpful: http://www.shinedraw.com/mathematics/difference-on-timer-enter-frame-dispatcher-timer-and-composition-target/

and this too

http://insideria.com/2009/01/scripted-animation-in-silverli.html

Eugene
+1, Silverlight handles animation very differently from Flash - arguably, more efficiently, but makes some tasks harder than in AS. Storyboards should be the way to go; however, even in Flash, framerate dependent scripting shouldn't be used unless it really is suitable for the task, and you don't care about the _actual_ time spent each frame, because it _will_ be variable. Silverlight disposes of this problem altogether by enforcing (to some extent) time-based animation/scripting.
Alex Paven