private void UpdateStates() { AnimatedVisualPlayer player = (AnimatedVisualPlayer)Children[0]; if (this.IsActive) { player.Opacity = 1; if (this.ShowPaused) { player.Pause(); } else if (this.IsIndeterminate) { _ = player.PlayAsync(0, 1, IsLooping); } else if (!this.IsIndeterminate) { player.SetProgress(ProgressPosition); } } else { player.Stop(); player.Opacity = 0; } }
private void UpdateProgressPosition(double progressPosition) { AnimatedVisualPlayer player = (AnimatedVisualPlayer)Children[0]; player.SetProgress(progressPosition); }