private void Pause() { ControlLabel.Text = "Pause"; MyMediaPlayer1.Pause(); StatusButton.Icon = new SymbolIcon(Symbol.Play); _isPlaying = false; }
private void SelectSong(object sender, TappedRoutedEventArgs e) { var selectItem = sender as StackPanel; MyMediaPlayer1.Pause(); if (selectItem != null) { if (selectItem.Tag is Song currentSong) { _currentIndex = _mySongs.IndexOf(currentSong); MyMediaPlayer1.Source = new Uri(currentSong.link); Play(); } } }
protected override void OnNavigatedFrom(NavigationEventArgs e) { MyMediaPlayer1.Pause(); }