Put mySong.mp3 in the Assets folder. Then, in Visual Studio, right-click the Assets folder and select Add Existing Item. Add mySong.mp3 from the Assets folder. In XAML add a player:
<MediaElement x:Name="myPlayer" AutoPlay="True" />
In C #, mySong.mp3 will play when you set the source:
Uri newuri = new Uri("ms-appx:///Assets/mySong.mp3"); myPlayer.Source = newuri;
pollaris
source share