简体   繁体   中英

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. I am developing in Xamarin Forms and am trying to access this from the windows phone 8.1 project through dependency injection.

To make it a little bit more clear this is the field I am trying to retrieve:

Package.appxmanifest

When I try accessing information from the Package.Current I don't see any options for the display name. I get the following options (none of these are the correct one):

Package.Current.Id

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. 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 ("").

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM