2013-01-21 29 views

回答

5

如果您正在访问的最终用户的图像/等,你可以不用MS-APPX像这样(其中文件类型StorageFile的):

var fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read); 
BitmapImage img = new BitmapImage(); 
img.SetSource(fileStream); 

如果您包括图片/等。在你的应用程序中,你可以使用ms-appx协议。它基本上意味着“从应用程序包中获取”。但是你也可以使用相对路径。见this article on how to load file resources