== Playing Media Files ==
To play a wave file, place a ''MediaElement'' control in the page or window:
...
...
To programmatically control de Media Player:
using System.Windows.Media;
using System.Windows.Media.Imaging;
...
private void btnPlay_Click(object sender, System.Windows.RoutedEventArgs e)
{
player.Source = new Uri(@"C:\TEMP\SoundApplication\demosoundclip.wav");
player.Play();
}
private void btnStop_Click(object sender, System.Windows.RoutedEventArgs e)
{
player.Stop();
}
private void sliderVolume_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
if (player != null)
{
player.Volume = sliderVolume.Value;
}
}