StreamResourceInfo sri;
sri = App.GetResourceStream(new Uri("WebBrowserIsoStorage;component/Images/textmate.jpg", UriKind.Relative));
using (BinaryReader reader = new BinaryReader(sri.Stream))
{
using (BinaryWriter writer = new BinaryWriter(imageStream))
{
while (sri.Stream.Position < sri.Stream.Length)
{
writer.Write(reader.ReadByte());
}
}
}
What does the WebBrowserIsoStorage; in the path mean (line 2)?
That uri string is a relative Pack UrI (see Table 2 in the linked page for a similar example).
The first part (
WebBrowserIsoStorage) is the assembly in which the resource (the textmate.jpg image) lives. The second part is the path to the resource within the assembly.