Answered by:
How to play audio in the background if a button is clicked or tapped(using C# XAML)

Question
-
Hi,
I have to keep three buttons, if i click the first button some audio should play and if i click the second button the first button's audio should stop and the second button's audio should play.
Please provide me the code for it.
Tuesday, September 17, 2013 6:22 AM
Answers
-
- Marked as answer by Anne Jing Monday, September 23, 2013 8:59 AM
Tuesday, September 17, 2013 6:26 AM -
Hi,
The sample Oleg give you work well in my computer.You can try it again in your computer.
And alsp you can refer to these links below:
http://msdn.microsoft.com/en-us/library/windows/apps/jj841209.aspx
http://code.msdn.microsoft.com/windowsapps/Background-Audio-c-Metro-d2fc7719#content
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.
Wednesday, September 18, 2013 5:51 AM
All replies
-
- Marked as answer by Anne Jing Monday, September 23, 2013 8:59 AM
Tuesday, September 17, 2013 6:26 AM -
i already downloaded this sample but in the project's folder i,e Background Audio in WinRT with C#\Obj\debug\Common\StandardStyles.g.cs could not be found.
It is not located in the specified folder.the file is missing.
Any other links please.
Tuesday, September 17, 2013 6:58 AM -
Hi,
The sample Oleg give you work well in my computer.You can try it again in your computer.
And alsp you can refer to these links below:
http://msdn.microsoft.com/en-us/library/windows/apps/jj841209.aspx
http://code.msdn.microsoft.com/windowsapps/Background-Audio-c-Metro-d2fc7719#content
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.
Wednesday, September 18, 2013 5:51 AM -
Hi, check this out.
Background Audio #win8dev #winrtWednesday, September 18, 2013 8:55 AM -
the text at the sample that Oleg gived should give good help too
Microsoft Certified Solutions Developer - Windows Store Apps Using C#
Wednesday, September 18, 2013 9:03 AM