(X) Hide this
    • Login
    • Join
      • Say No Bots Generate New Image
        By clicking 'Register' you accept the terms of use .
        Login with Facebook

Windows Phone Tutorial: Playing A Sound, Simplified

(0 votes)
0 comments   /   posted by Silverlight Show on Jan 30, 2012
Tags:   windows-phone , mango , jesse-liberty

Read original post at Jesse Liberty's Blog

In a previous posting I discussed how to play a sound using a background process. That is great when you need the sound to continue playing even if you leave your application. But much of the time you need something far simpler: just the ability to play a sound and be done with it.

For that, all you need is to add a MediaElement to your Xaml. In the following sample we place two buttons on the MainPage; one to start playing the sound and one to stop it.


Comments

No comments

Add Comment

Login to comment:
  *      *       
Login with Facebook

Our News on Twitter