In the PhoneApplicationLoaded
event I added the following code:
MediaPlayer.MediaStateChanged += StateSongChanged;
MediaPlayer.ActiveSongChanged += StateSongChanged;
But the StateSongChanged procedure doesn't seem to tigger?
Does anyone know why this is, I'm fairly new to C# so it's probably something fairly simple.
In addition, this is the StateSongChanged block:
private void StateSongChanged(object sender, EventArgs e)
{
// Code
}
XNA Framework events are triggered after calling
FrameworkDispatcher.Update();
so it's convenient to create IApplicationService class with timer, that calls FrameworkDispatcher.Update() over and over again.
For more info and how to read this: Enable XNA Framework Events in Windows Phone Applications