private void PlaySlideShow(Panel panel) { if (!_playing) { _playing = true; panel.Animate("SlideAnimation", new Animation(), length: 2000, finished: (v, c) => { if (_playing) { InternalPlaySlideShow(panel); } }, repeat: () => _playing); } else { _playing = false; panel.AbortAnimation("SlideAnimation"); } OnPropertyChanged("PlayState"); }