使用来自隔离存储的背景图像路径创建辅助磁贴

joh*_*X99 7 windows-phone-7

在我的应用程序中,我的所有图像都保存在IsolatedStorage空间中.我可以使用Uri创建一些辅助磁贴,链接到我的应用程序的独立存储吗?反正有没有这样做?我找不到东西.

感谢名单

Dam*_*icz 18

那么你的图像必须保存在Shared/ShellContent下.阅读文档这里.

所以例如你的图像Tile的路径将是这样的:

tileData.BackgroundImage = new Uri("isostore:/Shared/ShellContent/background.png", UriKind.Absolute)
Run Code Online (Sandbox Code Playgroud)

您必须添加"isostore"前缀才能从隔离的商店加载图像.