private void buttonLoad_Click(object sender, RoutedEventArgs e)
{
var openfiles = new OpenFileDialog();
if (openfiles.ShowDialog() == true)
{
Player.Stop();
Player.LoadMedia(openfiles.FileName);
Player.Play();
}
return;
//String pathString = path.Text;
//Uri uri = null;
//if (!Uri.TryCreate(pathString, UriKind.Absolute, out uri)) return;
//Player.Stop();
//Player.LoadMedia(uri);
//if you pass a string instead of a Uri, LoadMedia will see if it is an absolute Uri, else will treat it as a file path
//Player.Play();
}