Exemplo n.º 1
0
        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;
            }
        }