Music in the Background C# Windows Universal 8.1 -


at first thank ! i'm quite new in coding , i'm studying , study c# , object oriented code in windows universal 8.1 applications now. i'm building game project , , wanted put music in background when open application. didn't learned @ class , it's not working , don't have error don't hear music. source okay , music in assets , work don't understand. thank !

        namespace gameproject     {         public sealed partial class mainpage : page         {             mediaelement media = new mediaelement();            public mainpage()             {                 this.initializecomponent();                 playmusic();             }             private void playmusic()             {                 media.source = new uri("ms-appx:///assets/spaceinvaders/spaceinvaders.wav");                 media.play();             }      }    } 


Comments

Popular posts from this blog

python - How to clone or copy a list? -

The SDK directory does not exist (ubuntu 16.04) (react native) -

linux - How to use Android ltrace tool to trace an app? -