private void PlayButton_Click_1(object sender, RoutedEventArgs e) { if (playButton2.Content.ToString() == "Play") { Media2.Play(); playButton2.Content = "Pause"; } else { Media2.Pause(); playButton2.Content = "Play"; } }
private void Media2_Loaded(object sender, RoutedEventArgs e) { Media2.Position = TimeSpan.Zero; Media2.Play(); }
private void MediaElement2_MediaEnded(object sender, RoutedEventArgs e) { Media2.Stop(); Media2.Position = TimeSpan.Zero; Media2.Play(); }
private void RestartButton_Click_1(object sender, RoutedEventArgs e) { Media2.Stop(); Media2.Play(); }