Read original post by Derik Whittaker at Devlicio.us
When building WinRT applications it is going to be pretty common to want to play some sort of embedded audio file. It may also be common to want to play this file but via a ViewModel (or simply not in a view). In this post we are going to take a quick look at how to play an MP3 file by using the MediaElement control, but we will NOT be doing this via XAML, we will be doing via straight up code. The reason I am not using XAML here is because i don’t want to limit the places or times I can play audio, also I want to trigger the playing of the file via my ViewModel.