I am trying to learn WPF animation and are currently confused with a few things:
I used tools like processing, where you have a simple method called n minutes per minute, where n is the frame rate.
The way to make animations in WPF is to modify an asset if I use double animation for example, then the animation increases in the form of a double but it is not exactly what I want I am I want that some qualities will increase in every cycle, some are randomly modified and some users are modified by interaction. How can I do this in WPF?
The fact of my confusion is that WPF supports many animations at the same time. how does it work? Is there a thread for every animation or just one for all the animations.
I used GDI sometime back with C #. I can also use many threads for drawing; As far as I remember, I had to include all drawing commands in some queues and then the windows looked after them. I do not know how it is handled with WPF.
WPF does all the work for you so that you can specify the animation relative to the timer of the timepiece, such as "Move 3mm per second to the left". For more complex scenarios, you want to prepare your own animation, see the article on MSDN.
Regarding threading, WPF acts like GDI: a thread
handles all interaction with WPF model and you can only talk to this WPF control if You are running on this thread. If you are free threading you can use the "Send" code to this thread. The actual drawing on DirectX is done in a separate thread, but it is no concern for casual users of the API.
Comments
Post a Comment