I use MediaPlayer to play the background music. Sometimes, the music does not stop playing when I exit the game. This is even though I use the following code:
protected override void OnExiting(Object sender, EventArgs args)
{
base.OnExiting(sender, args);
MediaPlayer.Stop();
}
What is wrong?
Stop()
beforeonExiting(sender, args)
? – Pikalek Aug 13 '19 at 15:49