This code creates a MediaElement object with a name of mediaElement and sets the Source property to the path of an audio file. Two buttons are also created for controlling media playback. When the Play button is clicked, the Play method is called on the mediaElement object to start audio playback. When the Pause button is clicked, the Pause method is called to pause audio playback. Package library: The System.Windows.Controls.MediaElement is a part of the .NET Framework Class Library and is included in the PresentationFramework.dll assembly.private void PlayButton_Click(object sender, RoutedEventArgs e) { mediaElement.Play(); } private void PauseButton_Click(object sender, RoutedEventArgs e) { mediaElement.Pause(); }