Reading Resource Files

If you need to read content of an embedded file in a Silverlight dll, you can use Application.GetResourceStream() method as shown below. (Don’t forget to set “Resource” to “Build Action” property of the file in the Properties window. )


StreamResourceInfo sri = Application.GetResourceStream(new Uri("<projectname>;component/<filepath>", UriKind.RelativeOrAbsolute));

Leave a comment