public void Play(double fromProgress, double toProgress, bool looped) { if (_animation != null) { if (_animation.IsAnimationPlaying) { _animation.Stop(); } _animation.LoopAnimation = looped; void Start() { _animation.PlayFromProgress((nfloat)fromProgress, (nfloat)toProgress, isFinished => { if (looped && isFinished) { Start(); } }); } Start(); SetIsPlaying(true); } }