Adding a sound to the Button Click via PlaySoundAction in Windows Phone 7

Sometimes it may be necessary for you to play a sound on some action in your Windows Phone 7 . This could be on click of the button for the user to feel that he has touched something or may be someother scenario .

You can do this easily with the help of Microsoft Expression Blend 4 with the behavious known as PlaySoundAction .

To include a sound on the button click , follow the below steps .

1. Start the Expression Blend 4 and the open the current Project .

2. Add a button to the Page from the Assets tab – Controls

3. Change the Button properties like the name of the button or the text to be displayed on the button .

4. From the same assets tab – > Behaviours – select the PlaySoundAction – Drag and drop onto the button .

5. In the Objects and Timeline , make sure that you select the PlaySoundAction and now go  to the properties window on the right side of the screen .

6. Select the Event for which this behaviour should trigger . In our case it is the Click Event . Also select the Source file ( Media File) to play and the Volume .
7. Save all the change and press F5 to start the Application . When you click the button , you should be able to listen to the sound .

Here’s a video that demonstrates how to use PlaySoundAction in ExpressionBlend .

Using PlaySound Action for Button in Expresssion Blend

 

References

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

7 Comments

  1. mobil55 June 4, 2011 Reply
  2. marysfetus July 6, 2011 Reply
  3. Adding a sound to the Button Click via PlaySoundAction in Windows Phone 7 | ProgramInDotnet August 1, 2011 Reply
  4. Joey November 7, 2011 Reply
  5. arun November 30, 2011 Reply
    • Senthil Kumar December 7, 2011 Reply
      • ramya January 7, 2012 Reply

Leave a Reply


x

Interesting BlogPosts to read

Download - Pokemon Go for for Windows 10 (Third Party app)
Pokemon Go is one of the popular AR games for android and iOS devices and now , the game is made ava...
Open Wordpad from command line in Windows
You can use the command "Write" from command line in Windows to open the WordPad application.D:\>...
Popular cross-platform (android and iOS) to-do list app
In this blog post, we will cover some of the popular to-do list app that is available on different p...