1
votes

I am new to WinRT and XAML and have even less experience with animations. After researching the topic I have noticed that I can change a few individual properties on the storyboard target object as the animation is traversed. What I really need to to change an entire set of bezier path points with each frame to produce an entirely new sine type wave with random amplitudes and control points. Each amplitude's height would be random to approximate a sound wave at a given point in time and the animation is the changing sound patterns over time. All of the examples that I have seen are animations changing a property along the bezier path and traversing the path with each frame. I need to animate changing all the bezier points with each frame. Can I use a storyboard here or do I just need to draw a canvas on some kind of timer?

1

1 Answers

0
votes

There is no easy way to do it in XAML and for your problem it seems like an immediate mode rendering technology like Direct2D would be a better choice. I think the Path controls in XAML don't have the performance characteristic required for real-time waveform rendering.

Since you seem to want to animate it with a Storyboard - it seems like you might be thinking of a predetermined animation anyways and in that case perhaps you could simply use a video recording of such animation.

Otherwise - you could use the CompositionTarget.Rendering event to update your path in each frame using code-behind.