[英]How do you access the applications display name in windows phone 8.1 (Xamarin Forms)
I need to access the display name field stored in the Package.appxmanifest. 我需要访问存储在Package.appxmanifest中的显示名称字段。 I am developing in Xamarin Forms and am trying to access this from the windows phone 8.1 project through dependency injection.
我正在Xamarin Forms中进行开发,并尝试通过依赖项注入从Windows Phone 8.1项目访问此文件。
To make it a little bit more clear this is the field I am trying to retrieve: 为了更清楚一点,这是我尝试检索的字段:
When I try accessing information from the Package.Current I don't see any options for the display name. 当我尝试从Package.Current中访问信息时,显示名称没有任何选项。 I get the following options (none of these are the correct one):
我得到以下选项(这些都不是正确的):
Does anyone have any ideas how I can access this information? 有谁知道我如何访问此信息?
It seems you can't, have a look at this page in the documentation . 看来您不可以查看文档中的此页面。 It has this remark;
它有这句话;
This property is only supported for Windows Store app.
仅Windows Store应用程序支持此属性。 If you call this property on an instance of a package that was created by any mechanism other than Package.Current, this property returns an empty string ("").
如果在由Package.Current以外的任何机制创建的包的实例上调用此属性,则此属性将返回一个空字符串(“”)。
I'm not sure if the Package.appxmanifest
file is still in the app that is installed on the device, if so, you could try to read it manually and extract it from there. 我不确定
Package.appxmanifest
文件是否仍在设备上安装的应用程序中,如果是这样,则可以尝试手动读取它并从那里提取它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.