示例#1
0
        private void PlayPLAnimate() //play button animation for playlist
        {
            DoubleAnimation Anim = new DoubleAnimation();

            Anim.Completed += delegate
            {
                if (CurrentList.Count > 0)
                {
                    ChangeAudio(CurrentList[0]); // after the end of the animation, start playback from the first song in the playlist
                }
            };
            Anim.From     = 0;
            Anim.To       = 1;
            Anim.Duration = new Duration(TimeSpan.FromSeconds(1));
            PlayGrid.BeginAnimation(OpacityProperty, Anim);
        }
        private void PlayPLAnimate() //анимация кнопки воспроизвести для плейлиста
        {
            DoubleAnimation Anim = new DoubleAnimation();

            Anim.Completed += delegate
            {
                if (CurrentList.Count > 0)
                {
                    ChangeAudio(CurrentList[0]); // после окончания анимации начинаем воспроизведение с первой песни плейлиста
                }
            };
            Anim.From     = 0;
            Anim.To       = 1;
            Anim.Duration = new Duration(TimeSpan.FromSeconds(1));
            PlayGrid.BeginAnimation(OpacityProperty, Anim);
        }