private void PlayButton_Click(object sender, RoutedEventArgs e) { if (playButton1.Content.ToString() == "Play") { Media1.Play(); playButton1.Content = "Pause"; } else { Media1.Pause(); playButton1.Content = "Play"; } }
private void Media1_Loaded(object sender, RoutedEventArgs e) { Media1.Position = TimeSpan.Zero; Media1.Play(); }
private void MediaElement1_MediaEnded(object sender, RoutedEventArgs e) { Media1.Stop(); Media1.Position = TimeSpan.Zero; Media1.Play(); }
private void RestartButton_Click(object sender, RoutedEventArgs e) { Media1.Stop(); Media1.Play(); }