I want my sound to play when I click a button. the sound file will play but will only play once. I need it to play everytime i hit a button. please help.
Heres what i have so far::
XAML:
MediaElement x:Name="SoundClip" Source="Dart.mp3" AutoPlay="False" />
C#:
private void OutBull_Click(object sender, RoutedEventArgs e)
{
SoundClip.Play();
game.update_score(25);
updateGUI();
}
private void Bull_Click(object sender, RoutedEventArgs e)
{
SoundClip.Play();
game.update_score(50);
updateGUI();
}
I need all these to play the sound when i click them. Not just once in which it only does?????