.net - Delay a MediaElement in Silverlight without holding up the UI thread -


i have loop of audio files need played in mediaelement.

and need wait 5 seconds between each one, i'm experiencing trouble ui thread being held

thread.sleep() command. there way delay audio file ?

        int _interval_time = 5000;          ....          //loop start              thread.sleep(_interval_time); //holding ui              media.play();          //loop end 

i'm using silverlight 5 (xap) web control

thanks rob that, here created timer solve.

        dispatchertimer _timer = new dispatchertimer();         int counter = 0;         _timer.interval = timespan.fromseconds(1);         _timer.tick += (s, e) =>         {             counter++;              if (counter >= _interval_time)             {                 _timer.stop();                   //do stuff here               }          };         _timer.start(); 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -