wpf - How do I create a URI string that correctly points to a .wav file in my Resource directory? -
i need play sound byte (mp3
or wav
) within wpf
application. use mediaplayer
. have .wav
file with; "build action" = content
, "copy output directory" = "copy if newer"
, file located in resources directory of app.
however, cant uri
string right. (and maybe build action not correct)
i found tolga evcimen , work:
var outputdirectory = system.io.path.getdirectoryname(assembly.getexecutingassembly().codebase); var soundbytepath = system.io.path.combine(outputdirectory, "resources\soundbyte.wav");
Comments
Post a Comment