Thank you very much.
i modified the code to add the mediaelement to a stack panel in my page.
private void btnCode_Click(object sender, RoutedEventArgs e)
{
meC = new MediaElement();
meC.LoadedBehavior = MediaState.Manual;
mystackpanel.Children.Add(meC);
meC.Source = new Uri("C:/Music/10cc/10cc - Rubber Bullets.mp3", UriKind.Absolute);
meC.Play();
}
I'm still new to WPF and I was stuck on this one for a bit.
Thanks again.