您好,我正在尝试为Windows应用商店部署应用程序。该应用程序有很多纹理文件,字体和我的代码访问和加载的其他自定义的东西。我当前的阻塞是我无法将此资源复制到Myapp / Resources / 类目录,以便我可以检索。
Hello, I am trying to deploy an application, for the windows store. The application, has a lot of texture files, fonts, and other custom things that my code accesses and loads. My current blockage is that I cannot copy this resources to Myapp/Resources/ kind of directory so I can retrieve.
- 我该如何解决这个问题?
- 是否支持?
- 是否有我可以遵循的指南?
提前谢谢!
推荐答案
Hi Michae_P_C,
HiMichae_P_C,
欢迎到开发通用Windows应用论坛! 请使用 标记 当发布到此论坛时,谢谢!
在uwp中,我们可以将文件放在应用程序安装目录中并获取该文件通过以下代码,更多详细信息,您可以看到 文件访问权限。
In uwp, we can put files in theApplication install directory and get the file by the following codes, more details, you can see theFile access permissions.
using Windows.Storage; StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///file.txt"));此外,我们可以使用XAML为我们的应用定义UI或资源,并从我们的应用中获取,请参阅 ResourceDictionary和XAML资源引用。
Also, we can define the UI or resources for our app using XAML, and get it from our app, please refer to ResourceDictionary and XAML resource references.
此外,我们可以将UI的字符串资源放入资源文件中。然后,您可以从代码或标记中引用这些字符串。请参阅 将 UI字符串放入资源。
Besides, we can put string resources for our UI into resource files. You can then reference those strings from your code or markup. Have a refer toPut UI strings into resources.
祝你好运,
Breeze
更多推荐
[UWP] Windows Universal App适用于资源。
发布评论