Saturday, February 20, 2010

 

Silverlight MediaElement URIs for debug

Generally you do not want media to be included in the .XAP file as this quickly bloats the size of the .XAP file. However including the media in the .XAP file makes using uri's easier to work with while debugging. To include them in the .XAP click the media file in question and modify its' properties to be the following:
Build Action: Content
Copy to Output Directory: Do not copy

As for setting the source of the MediaElement or other elements that use this file; Use only forward slashes, "/". To debug a page showing media that is being run without the help of a web server (it's URL is something like "C:/myPage.htm") either the site needs to be set to be debuged on a web server (http://myPage.htm) or the uri must be pre-ceeded with a "/" ("/Images/pic.jpg" instead of "Images/pic.jpg")

Labels: , ,


Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]