I play a game with some other coders. You can write one oneline from C # and as many xaml lines as you want.
Does anyone know how to play sound on a single line before a semicolon;
It's as close as I can still
SoundPlayer simpleSound = new SoundPlayer(@"c:\Media\pacman.wav"); simpleSound.Play();
Edit: tried the Blorgbeard code, but the sound for some reason is not playing
if (Listbox.SelectedItem.ToString() == "2 Good 2 B True") { try { (new SoundPlayer(@"/Project;component/sounds/pacman.wav")).Play(); } catch (Exception ex) { Console.Error.WriteLine(ex.Message); } }
c # audio
rd42
source share