c# - "Animating" a MapPolyLine in Silverlight -
i need animate mappolyline such on given event, start pin zips end pin. approach considerg animate frames such divide mappolyline n number of segments , decrease timespan ts between each frame along logic of chosing (to keep things simple, let's ts = ts / 2 after each cycle).
i know 1 cannot animate mappolyline, 1 can change appearance of line updating latitude , longitude of end position. question concerns timing. experience multithreading minimal, did not want take risk of user running threading based error may difficult diagnose. should i:
- use simple dispatchertimer , tick method
- use backgroundworker reports progress every-time timespan has elapsed
- use dummy animation , attach event handler rendering event
- solution other above mentioned options?
thank in advance help!
decided use dispatchertimer considering amount of time animation going take - creating separate animation object holds state , own dispatch timer, ended being more efficient using separate threads because callback mean interrupting main ui thread , based on requirements highly unlikely there more 2-3 of these animations occuring simultaneously 95% or greater being 1 animation @ time.
Comments
Post a Comment